PDA

View Full Version : [FIXED] Cannot define Ext.data.field.Field.reference config as an object



abuisson
13 Mar 2017, 3:42 AM
Hi all,

Today I migrated from SA 4.0 to SA 4.1.1 and after have error on references defined on my models.

The matter is on config reference of Ext.data.field.Field class.
With SA 4.0, I can define it as an object ilke as below:

reference: {
type: 'folder.Folder',
inverse: 'folder'
}
With SA 4.1.1, it has been converted into a string
reference: '{ type: \'folder.Folder\', inverse: \'folder\'}'

When i try to change type of reference config, I can select only Model or String, not Object as in SA 4.0.

Could you please advise if it's a bug of SA 4.1.1 or I should define my references in another manner ?

Thanks in advance.

petr.vecera
13 Mar 2017, 4:33 AM
Hello

I am very sorry for this inconvenience, this is a bug http://docs.sencha.com/extjs/6.2.1/modern/Ext.data.field.Field.html#cfg-reference

I will send you PM with workaround.

Regards
Petr

nclemeur
13 Mar 2017, 4:42 AM
Anyway that you can share the workaround as I would be interested to try a few things. Mostly around renaming the inverse association, and I believe this could maybe done that way...
Cheers

Nicolas

petr.vecera
13 Mar 2017, 5:18 AM
Anyway that you can share the workaround as I would be interested to try a few things. Mostly around renaming the inverse association, and I believe this could maybe done that way...
Cheers

Nicolas
Hi Nicolas

What exactly is bothering you? Is it reported as a bug somewhere? If there is something broken / could be improved? It would be nice if we could improve this for all the users rather than trying creating work-around for one user.

Thanks

nclemeur
13 Mar 2017, 3:07 PM
Hi Nicolas
What exactly is bothering you? Is it reported as a bug somewhere? If there is something broken / could be improved? It would be nice if we could improve this for all the users rather than trying creating work-around for one user.
Thanks

Well I did ask the question in the following thread https://www.sencha.com/forum/showthread.php?335504-Inverse-association-name

So I am still hunting for a good solution to this problem...

Cheers

Nicolas

dnoizet
4 Apr 2017, 7:50 AM
Hello

I am very sorry for this inconvenience, this is a bug http://docs.sencha.com/extjs/6.2.1/modern/Ext.data.field.Field.html#cfg-reference

I will send you PM with workaround.

Regards
Petr

I'm interested too in the workaround, because it broke my app as I was relying on this "inverse" config. Could you please share it? Or send by PM? I opened a thread today for the same issue: https://www.sencha.com/forum/showthread.php?338588-quot-reference-quot-property-on-Model-field-should-allow-an-object-config.Thanks !

[edit] Thanks for the fix in PM! Fixed it.

mpokross
12 Apr 2017, 10:28 AM
I need a workaround for this.

Thanks

Matt