Results 1 to 4 of 4

Thread: Model field referencing in memory model?

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    40
    Answers
    2

    Default Answered: Model field referencing in memory model?

    Hi,

    How can I have a reference to an in memory model? for example A post model has a reference to an author but I've got an in memory store of authors. has can I get the getAuthor populated when loading the posts store?

    A fiddle for the example: https://fiddle.sencha.com/#fiddle/qkf

  2. Quote Originally Posted by chanand View Post
    Thank you for the response.

    How?? Can you explain? And add an example? There's a lack of documentation/examples is this area..
    Sure, try this example: https://fiddle.sencha.com/#fiddle/r5e

    Thanks
    Joel

  3. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by chanand View Post
    Hi,

    How can I have a reference to an in memory model? for example A post model has a reference to an author but I've got an in memory store of authors. has can I get the getAuthor populated when loading the posts store?

    A fiddle for the example: https://fiddle.sencha.com/#fiddle/qkf
    Hi--

    You could do this by having both user and post stores belong to the same session:
    http://docs.sencha.com/extjs/6.0/6.0...t.data.Session

    Thanks!
    Joel

  4. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    40
    Answers
    2

    Default

    Quote Originally Posted by joel.watson View Post
    Hi--

    You could do this by having both user and post stores belong to the same session:
    http://docs.sencha.com/extjs/6.0/6.0...t.data.Session

    Thanks!
    Joel
    Thank you for the response.

    How?? Can you explain? And add an example? There's a lack of documentation/examples is this area..

  5. #4
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by chanand View Post
    Thank you for the response.

    How?? Can you explain? And add an example? There's a lack of documentation/examples is this area..
    Sure, try this example: https://fiddle.sencha.com/#fiddle/r5e

    Thanks
    Joel

Similar Threads

  1. Replies: 1
    Last Post: 27 Sep 2014, 6:35 AM
  2. Replies: 0
    Last Post: 8 Nov 2013, 5:19 AM
  3. Replies: 2
    Last Post: 20 Mar 2013, 2:39 AM
  4. Replies: 7
    Last Post: 26 Aug 2011, 6:23 AM

Tags for this Thread

Posting Permissions

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