openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <da...@6degrees.com>
Subject Re: OpenJPA Relationships Question
Date Fri, 09 Oct 2009 17:03:57 GMT
On Fri, Oct 9, 2009 at 12:53 PM, Benjamin S Vera-Tudela <
bveratudela@us.ibm.com> wrote:

> @Daryl,
>
> Yes, it works sometimes (very seldom). In my code I create Class2 first and
> then create the Relationship. I suppose you suggest I do it the other way
> around? I will try that.
>
Within the transaction it doesn't matter what order. All the queries are
generated and issued when the transaction is committed.

>
> Also, the @ForeignKey annotation should go in the Relationship class right?
> Let me know. I can make changes now.
>
> I put @ForeignKey after every @JoinColumn (which most frequently appears
after @ManyToOne). (It should go in every class on every field that uses a
foreign key to join.)

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message