]
Emmanuel Bernard updated ANN-702:
---------------------------------
Fix Version/s: (was: 3.3.1.CR1)
3.3.1
Warning on tables with inheritance when table defaults are set in
entity-mappings
---------------------------------------------------------------------------------
Key: ANN-702
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-702
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.0.ga
Environment: Using Annotations
Reporter: Stephen Todd
Priority: Trivial
Fix For: 3.3.1
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: