PDA

View Full Version : Model association bug



corvonero
6 Oct 2012, 3:16 PM
I haven't had much time to investigate on this,
but I think I spotted a bug/problem.

When you describe a model -> model assosiaction (hasMany / hasOne) the getters/setters are not correctly placed.

This occurs with extjs 4.1.x

It *might* be a loading time issue or just a glitch.

If you don't explicitly define a setter/getter you end up with this:

ownerProto[getterName] = me.createGetter();
ownerProto[setterName] = me.createSetter();

where getterName and setterName are:

getAPPNAME.models.SomeModel
while it should be
getSomeModel

this can either be fixed at architect level or extjs level...
as long as there is consistency...

M.

corvonero
6 Oct 2012, 3:17 PM
temporary fix:

manually set getters/setters in sencha architect!

M.

corvonero
6 Oct 2012, 3:56 PM
similar problem with foreignKey and other stuff...
to fix, explicitly set the correct values...

aconran
9 Oct 2012, 1:42 PM
corvonero -

It does sound like you have spotted a potential bug but we'll need some more details in order to troubleshoot and fix this issue. Could you provide a set of steps that illustrate the issue?

aconran
9 Oct 2012, 2:35 PM
Is this a duplicate of
http://www.sencha.com/forum/showthread.php?244861-Can-t-have-more-than-one-association-instance-of-the-same-model