• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use one-to many relation in CMPs , i mean how to assign childs to parent

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post.
Imagine that :
I create some CMP (so they are records in database)
now The parent CMP has a method which take a collection of child cmp home ,
is it manedatory to use this method to assign childs to a parent or it is for time that we want to change some records parent ?
because in childs CMP create method there is a parameter for parent home.

any sample could be usefull
Thank you.
 
Scott Selikoff
author
Bartender
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think what your asking is it mandatory for database references to be reflected in your CMP beans and the answer is no. You could set the references using the object id's directly yourself, although since you went through the trouble of setting up CMP in the first place, its far better to set object references that the server will resolve to database object id references.

There are many examples (ask google) for CMP with one-to-many XML snippets out there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!