[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-569) Map the same class twice in orm.xml
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Fri Mar 9 16:07:10 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-569?page=all ]
Emmanuel Bernard resolved ANN-569:
----------------------------------
Resolution: Won't Fix
You're correct, entity-name are only used in JPA for queries. I can't remember the details but I haven't been able to use to map Enttiy.name to entity-name (the Hib notion) without breaking the spec.
Remember that the API has no entityName parameter.
>From what I understand, Gavin wanted to push it and the initial API proposal had it. Then the feature was removed (but the - empty - notion remained)
> 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.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list