Results 1 to 3 of 3

Thread: Foreign key deleted when reading nested data

    You found a bug! We've classified it as EXTJS-18608 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2012

    Default Foreign key deleted when reading nested data


    Ext version tested:

    • Ext 5.1.1 rev 451
    Browser versions tested against:
    • Chrome 43
    DOCTYPE tested against:
    • Strict
    • Role classes delete inline associations on the data object when reading nested data. The problem is they assume that the role name is used as the key on the data object and this is not always the case. Sometimes it is the association key, and even then the association key can use the dot notation so it requires parsing for finding the correct key to delete on the data object.

      This becomes a real problem when the field reference config does not specify role AND the foreign key does not end with "id". We end up with a role name the same as the foreign key. When reading associations, the role classes delete the foreign key on the data object. In my fiddle, I create a store from a user loaded with nested data, and filter on the foreign key for this association. If you comment the override, the filter fails because the foreign key has been deleted on the data object.

      My fiddle overrides only the Right side of a manyToOne association but this a problem with all role classes.
    Steps to reproduce the problem:
    • open Fiddle and comment override
    The result that was expected:
    • The store has a count of 1
    The result that occurs instead:
    • The store has a count of 0 because it is filtered on a property that has been deleted

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2012


    Bump. I think this is a rather important bug.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Lawrence, KS


    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. Problem with reading strange/foreign characters from JSON file
    By Stiijnn in forum Sencha Touch 2.x: Q&A
    Replies: 6
    Last Post: 17 Oct 2013, 4:12 AM
  2. Replies: 5
    Last Post: 11 Apr 2013, 4:24 AM
  3. reading nested data from json store.
    By deepak_patil1222 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 27 Aug 2012, 11:27 PM
  4. Reading nested data from JSON into a store
    By direct2kali in forum Ext: Q&A
    Replies: 1
    Last Post: 23 Aug 2012, 6:15 PM
  5. Reading data double-nested in arrays
    By ogradyjd in forum Ext: Discussion
    Replies: 1
    Last Post: 29 May 2012, 11:49 PM

Posting Permissions

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