Re: [Objectbridge-jdo-dev] Relationships in objects/data
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-05-17 10:33:07
|
Hi Travis, tr...@th... wrote: > How does OJB handle things like: > > public class Person > { > String Name; > Address myAddress; > } > > public class Address > { > String street1; > String street2; > String city; > String state; > String zip; > } > > Would the address instance in a person instance be persistent if you stored the person instance? > Depends! Have a look at tutorial 3 how to define cascading deletes, updates and inserts. The behaviour can be configured in the repository. > Or what if that person class looked like this: > > public class Person > { > String Name; > java.util.List addresses; // list of address objects > } > > Does ojb have any way of dealing with that? > Sure ! Have a look at tuorial 3 to see how to define 1:1, 1:n and m:n associations. > Travis Reeder > Chief Software Architect > www.ThinkVirtual.com > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-jdo-dev mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-jdo-dev > > > > |