PDA

View Full Version : model hasmany association not accessable



dewil_de
9 May 2012, 4:14 AM
I have the following models defined in sencha architect

35027

when i do the following lines of code



me.event = Ext.ModelManager.getModel('EventManager.model.Event');
me.event.load(selections[0].getId(), {
success: function(event) {


and log the event i get the following

Object


data: Object

createdBy: "Employee 1"
endTime: "1970-01-01T10:53:44.000+0000"
eventType: "reunion"
id: "8ae3859436ed605e0136ee1215e40000"
latitude: 51.141393
location: "George W. lane 2445, Boston USA"
longitude: 4.441736
modId: 0
name: "A-Team reunion"
objective: "bringing everyone back together"
product: "A-team merchadise"
question2Checked: false
questionChecked: true
startTime: "1970-01-01T10:53:44.000+0000"
__proto__: Object

dirty: false
editing: false
events: Object
id: "EventManager.model.Event-8ae3859436ed605e0136ee1215e40000"
internalId: "8ae3859436ed605e0136ee1215e40000"
modified: Object
phantom: false
raw: Object

costs: Array[2]
createdBy: "Employee 1"
endTime: "1970-01-01T10:53:44.000+0000"
eventType: "reunion"
id: "8ae3859436ed605e0136ee1215e40000"
latitude: 51.141393
location: "George W. lane 2445, Boston USA"
longitude: 4.441736
modId: 0
name: "A-Team reunion"
objective: "bringing everyone back together"
participants: Array[4]
product: "A-team merchadise"
question2Checked: false
questionChecked: true
startTime: "1970-01-01T10:53:44.000+0000"
__proto__: Object

__proto__: Object
as you can see, in the raw data the costs and participants are set but there should be a particpantsStore/costStore on my event model?

What am i missing here?

tmdonalds
14 Jun 2013, 6:06 AM
Any update to this request. My guess is we have to build the JSON manually and skip the associations.