Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Dev List »

[hibernate-dev] Is @SecondaryTable required when a join table is
 specified?

Gail Badner

2013-03-01

Replies: Find Java Web Hosting

Author LoginPost Reply
I noticed that org.hibernate.test.annotations.onetoone.OneToOneTest and OptionalOneToOnePKJCTest uses this mapping:

https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/resources/org/hibernate/test/annotations/onetoone/orm.xml

Son.father specifies a join-table ("father_son"), but has no <secondary-table>. There is no @SecondaryTable defined in Son (this is a unidirectional association).

I thought that @SecondaryTable was required when an association uses a join table. Currently, that's how it works in the new metamodel.

Should it be optional?

Thanks,
Gail
_______________________________________________
hibernate-dev mailing list
hibernate-dev@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-dev
©2008 gg3721.com - Jax Systems, LLC, U.S.A.