[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-user
Subject:    Re: Caused by: <openjpa-1.1.0-r422266:659716 fatal user error>
From:       Michael Dick <michael.d.dick () gmail ! com>
Date:       2009-03-20 22:56:05
Message-ID: 72c1350f0903201556q3bcfeaads59b46695cdb61fcd () mail ! gmail ! com
[Download RAW message or body]


Well the ideal solution would be to use only one of the annotations. OpenJPA
won't be able to resolve the mapping data correctly with both of them.

Can you elaborate on the problem you were working around that prompted you
to add both annotations?

-mike

On Fri, Mar 20, 2009 at 5:52 PM, David Blevins <david.blevins@visi.com>wrote:

> FYI to archive searchers,  thread moved here:
> 
> 
> http://n2.nabble.com/Fwd%3A-Caused-by%3A--%3Copenjpa-1.1.0-r422266%3A659716-fatal-us \
> er-error%3E-org.apache.openjpa.persistence.ArgumentException%3A-.......-cannot-be-annotated-by-two-persistence-strategy-annotations.-td2511552.html
>  
> -David
> 
> 
> On Mar 19, 2009, at 7:37 PM, jooocz wrote:
> 
> 
> > Hello to everyone,
> > 
> > Whenever I run my test file, I'm getting an ArgumentException error caused
> > by using a two persistence strategy annotations.
> > 
> > Caused by:  <openjpa-1.1.0-r422266:659716 fatal user error>
> > org.apache.openjpa.persistence.ArgumentException: ....... cannot be
> > annotated by two persistence strategy annotations.
> > 
> > Example : I have entities A, B, C, and D. In my D entity I use the
> > following
> > > 
> > 
> > @OneToOne
> > @JoinColumns({
> > @JoinColumn( name="a_id"   , referencedColumnName="A_ID" ),
> > @JoinColumn( name="b_id"   , referencedColumnName="B_D"  ),
> > @JoinColumn( name="c_id"   , referencedColumnName="C_ID" )
> > })
> > @ManyToOne
> > private Abc abc; //We also have an Abc entity
> > 
> > In this field (abc), I used @OneToOne and @ManyToOne. Our team did this as
> > a
> > workaround. We had problems then with JPA version.
> > 
> > Anyway, I would like to ask if what can I do to resolve this.
> > Thanks in advance for any help.
> > 
> > - Jo
> > --
> > View this message in context:
> > http://www.nabble.com/Caused-by%3A--%3Copenjpa-1.1.0-r422266%3A659716-fatal-user-e \
> > rror%3E-org.apache.openjpa.persistence.ArgumentException%3A-.......-cannot-be-annotated-by-two-persistence-strategy-annotations.-tp22613368p22613368.html
> >  Sent from the OpenEJB User mailing list archive at Nabble.com.
> > 
> > 
> > 
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic