[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-290?page=co...
]
Emmanuel Bernard updated EJB-290:
---------------------------------
Fix Version/s: 3.3.2.GA
Basically the XML overriding is dump or the WARN does not check Table.name (I would rather
fix the former)
Warning on tables with inheritance when table defaults are set in
entity-mappings
---------------------------------------------------------------------------------
Key: EJB-290
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-290
Project: Hibernate Entity Manager
Issue Type: Bug
Affects Versions: 3.3.1.GA
Environment: Using Annotations
Reporter: Stephen Todd
Priority: Trivial
Fix For: 3.3.2.GA
Attachments: inheritance-orm.xml, TestSingleTableInheritanceWarnings.java
The following warning message is logged when entity-mapping defaults are set and tables
with inheritance are present:
Illegal use of @Table in a subclass of a SINGLE_TABLE hierarchy: class.name.Here
I attached a test case that recreates the problem. Basically, the error occurs when a
resource contains persistence-unit-defaults. It appears that hibernate creates an @Table
attribute for every registered entity when I think it should only do it for non-single
table inheritance entities. Below is an example of the orm.xml
<entity-mappings>
<persistence-unit-metadata>
<persistence-unit-defaults>
<catalog>public</catalog>
</persistence-unit-defaults>
</persistence-unit-metadata>
<entity class="hibernatebugs.TestAnnotationWarnings$ParentEntity">
<inheritance strategy="SINGLE_TABLE"/>
</entity>
</entity-mappings>
Test requires EasyMock and Log4J.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira