|
Re: OneToMany two times [message #480783 is a reply to message #454260] |
Tue, 18 August 2009 13:21 |
|
You must use the @JoinTable annotation whenever you have two
OneToMany/ManyToMany relationships to the same class. This is because the
JPA defined defaulting auto-mapping rules require using the
<source>_<target> as the default table name, as normally it is the best
name to use, but of course does not work if you have multiple
relationships.
Also please log a bug that a warning or error message should be logged if
there are multiple OneToMany/ManyToMany relationships to the same class
(or a different naming strategy should be used in the case of multiple).
---
James
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.03892 seconds