Results 1 to 2 of 2

Thread: model hasmany association not accessable

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    28

    Default model hasmany association not accessable

    I have the following models defined in sencha architect

    Schermafbeelding 2012-05-09 om 14.07.08.jpg

    when i do the following lines of code

    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?

  2. #2

    Default

    Any update to this request. My guess is we have to build the JSON manually and skip the associations.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •