Since the relationship is unowned, you will want to persist in at
least one of the objects a pointer to the other. This pointer could be
whatever you use as the key of the other object, or it could be some
other property of the other object which is guaranteed to identify
that other object uniquely.


On Nov 15, 5:01 pm, atank <amt...@gmail.com> wrote:
> Hi Guys,
>
> I am new to JDO and Google App engine. I have a basic question here. I
> have 2 entity UserEntity  and CandidateEntity. The UserEntity  and
> CandadateEnity have Unowned RelationShips. So now I create objects of
> both UserEntity and CandidateEntity and save it using the following
> code
>
> PersistenceManager pm = getPersistenceManagerFactory()
>                                 .getPersistenceManager();
>                 try {
>                         pm.makePersistent(s);
>                 } finally {
>                         pm.close();
>                 }
>
> This way I save both the entities. Now how do I tie them in Unowned
> Relationship so that when I query Candidate I get userEntity also?
>
> THanks,
> Amit

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to