You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Rajesh Yarlagadda <ya...@hotmail.com> on 2010/12/21 12:07:40 UTC

Urgent solution EJB3.0 with OpenJPA

Hi ,

i am working on EJB3.0 with Toplink for container managed transactions on
Glassfish server.

i'm moving to WAS7 with Apache OpenJPA.

i have a problem in this scenario:

i have two entities TableA.java(TableA in database) and TableB.java(TableB
in database) with unidirectional one-to-many from TableA(one) to
TableB(many).

While persisting the TableA, toplink orm creates another JOIN table for
one-to-many mapping with name " TableA_TableB" table with TableA primary key
as foriegn and TableB primary key as foriegn and both act as composite
primary key mantains one-to-many mappings.

Is there any such kind on mechanism implemented by OpenJPA EJB3.0 container
managed one-to-many mappings to create or identify existed the JOIN Table?

Thanks,
Rajesh Yarlagadda
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Urgent-solution-EJB3-0-with-OpenJPA-tp5855390p5855390.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Urgent solution EJB3.0 with OpenJPA

Posted by Ravi Palacherla <ra...@oracle.com>.
I think @JoinTable should help. Please check
http://openjpa.apache.org/builds/2.0.0/apache-openjpa-2.0.0/docs/manual/manual.html#jpa_overview_mapping_assoccoll

Regards,
Ravi.

On Dec 21, 2010, at 4:07 AM, Rajesh Yarlagadda wrote:

> 
> Hi ,
> 
> i am working on EJB3.0 with Toplink for container managed transactions on
> Glassfish server.
> 
> i'm moving to WAS7 with Apache OpenJPA.
> 
> i have a problem in this scenario:
> 
> i have two entities TableA.java(TableA in database) and TableB.java(TableB
> in database) with unidirectional one-to-many from TableA(one) to
> TableB(many).
> 
> While persisting the TableA, toplink orm creates another JOIN table for
> one-to-many mapping with name " TableA_TableB" table with TableA primary key
> as foriegn and TableB primary key as foriegn and both act as composite
> primary key mantains one-to-many mappings.
> 
> Is there any such kind on mechanism implemented by OpenJPA EJB3.0 container
> managed one-to-many mappings to create or identify existed the JOIN Table?
> 
> Thanks,
> Rajesh Yarlagadda
> -- 
> View this message in context: http://openjpa.208410.n2.nabble.com/Urgent-solution-EJB3-0-with-OpenJPA-tp5855390p5855390.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.