[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: OneToMany two times

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