[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-290?page=co...
]
Emmanuel Bernard moved HHH-2617 to EJB-290:
-------------------------------------------
Affects Version/s: (was: 3.2.2)
3.3.1.GA
Key: EJB-290 (was: HHH-2617)
Project: Hibernate Entity Manager (was: Hibernate3)
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