1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    57
    Vote Rating
    0
    javaman is on a distinguished road

      0  

    Default Composite primary key - N:M relationship - reader problem

    Composite primary key - N:M relationship - reader problem


    I have a table that have a composite primary key.

    How can I do a reader with that?

    I found this thread about that.
    I want to know, is there a better solution for that?

    http://extjs.com/forum/showthread.php?t=27433&

    I search on api and examples and didn't find anything about it.

    []'s

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Posts
    57
    Vote Rating
    0
    javaman is on a distinguished road

      0  

    Default


    nobody?

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    That solution was only to get the correct id. If you don't care about the id value you can also have it auto-generate (don't specify an id or idProperty/idIndex).

    There's also a patch floating around that modifies getJsonAccessor so it accepts functions (so you can build any id you want).

  4. #4
    Sencha User
    Join Date
    Feb 2009
    Posts
    57
    Vote Rating
    0
    javaman is on a distinguished road

      0  

    Default


    Thanks Condor.

    But I really need the ID.

    The table has 2 id's, from another 2 tables.
    So, I need the id's to update the values in the correct registry.

    I think the only solution is that you have explained in the other thread, correct?
    Is there a better one?

    And at my controller, I have to separate the id's that are posted, right?

    Another thing, i searched about getJsonAccessor and didn't find anything about on api.
    What's is that?

    []'s

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Do you really need an id? I think you only need 2 fields with the id values.

    ps. getJsonAccessor is a private method of JsonReader, so it isn't documented.

  6. #6
    Sencha User
    Join Date
    Feb 2009
    Posts
    57
    Vote Rating
    0
    javaman is on a distinguished road

      0  

    Default


    Hum, right condor!

    I was thinking about the id's that I just forget that I can post then as simple fields....

    Thanks condor!

    Thread resolved!

    Just one more thing, the method getJsonAccessor do what?
    I searched on forum and found some threads with that but I didn't understeand what it does.

    []'s

  7. #7
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,649
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    As my understanding the JsonAccessor does the mapping.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    It's used to convert a mapping to a function that retrieves the data from the JSON object, e.g.
    Code:
    mapping: 'myfield'
    is converted to:
    Code:
    function(o){return o['myfield'];}

  9. #9
    Sencha User
    Join Date
    Feb 2009
    Posts
    57
    Vote Rating
    0
    javaman is on a distinguished road

      0  

    Default


    Ok, thank you!

    Now, thread really resolved!

    []'s

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar