PDA

View Full Version : Auto generated methods for associations not generated



ohcibi
19 Dec 2014, 2:47 AM
Hi,

I have defined some basic associations like in the example. There is nothing special and I just want to use the conventions for keynames, methodnames, etc. However if I have a model called Asset and model called Comment and I define an association like Asset has many Comments there is no comments() method on my asset records unless I explicitly specify a name property in the config. The docs however say that

[...] If not specified, the pluralized name of the child model is used.
This is just not true. See this example: https://fiddle.sencha.com/#fiddle/fbi There is no "users" property on the group model without specifying it.

lumberjack
29 Dec 2014, 9:56 AM
When the User model definition exists, the auto-generated methods seem to work for me.

Regards,
Brian

https://fiddle.sencha.com/#fiddle/flf
flf