Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiplicity of the relationship

 
marcus don
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
on pag. 422 of HF

"If the multiplicity of the relationship field is ONE, it's a MOVE
If the multiplicity of the relationship field is MANY, it's a COPY
"

I've seen the example but I still don't understand :roll:

May you gimme a little hint, or a simple trick to understand it better?

Thanks
[ July 08, 2005: Message edited by: marcus don ]
 
Surya Kumar
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow the sample of relation between movies and directors as specified right there.
 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First assumes, For every entity objects selected as result of findByXXX has indiviual reference and return as whole collection in single reference(Collection reference).

So, many to one means, the entity objects in collection(one side as cmr field) can be possible in the one collection of the same relation ship type.

So that if we want one entity object from one collection to another collection means, effectively as move the entity object from one collection to another collection.

Likewise many to many relation ship means, one entity objects can be possible in more than one collection, so that the same entity object reference can be possible in more than one collection, so that if we want one entity object from one collection to another collection means entity objects reference are copied.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic