[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-794?page=co...
]
Alexander Kiel commented on HHH-794:
------------------------------------
I think this issue is normal. If you have a class A which hase more than one many-to-one
rel. to class B, than every XML node will be named equal. The name of the XML node comes
from the "node" attribute of the mapping of class B. If you want an other XML
node name you can specify it on the many-to-one mapping.
EntityMode.DOM4J - Multiple many-to-one's to same object can
cause incorrect names in XML
-----------------------------------------------------------------------------------------
Key: HHH-794
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-794
Project: Hibernate3
Type: Bug
Versions: 3.1 beta 1, 3.0.5
Environment: Windows XP, SQL Server
Reporter: Preston Sheldon
Attachments: XMLTestCase.zip
An Class that contains 2 many-to-one relationships to the same table, returns an
incorrect element name for 1 of the mappings when data is retrieved using
EntityMode.DOM4J.
For example
Object A has an initialStatus and currentStatus attribute which both map to a Status
reference table. In some cases, both elements will be named <currentStatus> even
though the data is correct.
<TestObject>
<id>1</id>
<data>Test Data</data>
<currentStatus> <-- This element should be named <initialStatus>
<id>1</id>
<value>Open</value>
</currentStatus>
<currentStatus>
<id>1</id>
<value>Open</value>
</currentStatus>
</TestObject>
--
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