[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-569?page=co...
]
Christian Bauer commented on ANN-569:
-------------------------------------
I solved my problem in a different way (using a Hibernate XML mapping file). Still, I
wonder if we could utilize the dynamic mapping capabilities of Hibernate (at least mixing
POJO and MAP entity modes) if we'd relax orm.xml somewhat.
Map the same class twice in orm.xml
-----------------------------------
Key: ANN-569
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-569
Project: Hibernate Annotations
Type: New Feature
Components: binder
Reporter: Christian Bauer
Priority: Minor
Regular annotated class, I'd like to map it again in orm.xml with a different set of
persistent attributes (they are annotated transient in the regular class):
<!-- If I don't have the regular class mapped here, I get only a NODE_HISTORY
table. I want two tables. -->
<entity class="Node" name="RegularNode"
access="FIELD">
<table name="NODE"/>
</entity>
<entity class="Node" name="HistoricalNode"
access="FIELD">
<table name="NODE_HISTORY"/>
<attributes>
<id name="historicalNodeId">
<column name="NODE_HISTORY_ID"/>
<generated-value/>
</id>
<basic name="revision" optional="false">
<column name="NODE_REVISION"/>
</basic>
<basic name="id" optional="false">
<column name="NODE_ID"/>
</basic>
</attributes>
</entity>
I currently only have 3.2.0 CR1 (Seam...) here:
[hibernatetool] javax.persistence.PersistenceException: java.lang.IllegalStateException:
Duplicate XML entry for org.jboss.seam.wiki.core.node.Node
[hibernatetool] java.lang.IllegalStateException: Duplicate XML entry for
org.jboss.seam.wiki.core.node.Node
If the spec forbids duplicate class names in orm.xml (does it?) - how can I override
mappings under a different entity alias?
--
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