You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Vlad Tatavu <vt...@ca.ibm.com> on 2007/01/12 21:20:47 UTC

@ForeignKey not allowed for @ManyToMany

Is there a reason why @ForeignKey is not allowed for @ManyToMany?

Vlad

Re: @ForeignKey not allowed for @ManyToMany

Posted by Vlad Tatavu <vt...@ca.ibm.com>.
I wouldn't say that's obvious, but it make sense and it works.  Thanks!

Vlad




Abe White <aw...@bea.com> 
12/01/2007 03:24 PM
Please respond to
open-jpa-dev@incubator.apache.org


To
open-jpa-dev@incubator.apache.org
cc

Subject
Re: @ForeignKey not allowed for @ManyToMany






> Is there a reason why @ForeignKey is not allowed for @ManyToMany?

Because the field value is a collection, not a reference.  You want 
to use @ElementForeignKey.
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.


Re: @ForeignKey not allowed for @ManyToMany

Posted by Abe White <aw...@bea.com>.
> Is there a reason why @ForeignKey is not allowed for @ManyToMany?

Because the field value is a collection, not a reference.  You want  
to use @ElementForeignKey.
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.