[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1081?page=c...
]
Chris Lowe commented on HBX-1081:
---------------------------------
In this example, if the generated-class is omitted under the composite-id
("XXX2Base"), then the class generation uses the outer generated-class attribute
to also name the composite-id class. This has the side effect of immediately overwriting
the entity class with the contents of the composite id class. Should this be
treated/prioritised as a bug rather than a mere improvement?
I've verified this behaviour with the recent
HibernateTools-3.2.4.CR1-R200812191611.zip release.
Generation of meta attributes for composite-id
----------------------------------------------
Key: HBX-1081
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1081
Project: Hibernate Tools
Issue Type: Improvement
Components: reverse-engineer
Affects Versions: 3.2.beta11
Environment: All, not related to platform.
Reporter: Anders Reinhardt Hansen
Priority: Minor
Fix For: 3.2.4.CR1
The ReverseEngineeringStrategy has a method; "public Map
tableToMetaAttributes(TableIdentifier tableIdentifier)"
This method returns a Map of meta tags which will be put inside the class node of the hbm
files that are generated.
It would be a nice addition if we could have a method like this which placed meta tags
inside the composite id node.
the method could be called "public Map
tableToMetaAttributesForCompositeId(TableIdentifier tableIdentifier)"
An example of the problem is shown in the below example;
<class name="XXX1" table="XXX1">
<meta attribute="generated-class">XXX1Base</meta>
<!-- this can be generated by tableToMetaAttributes() -->
<composite-id name="XXX2" class="XXX2">
<meta attribute="generated-class">XXX2Base</meta>
<!-- this cannot be generated -->
<key-property name="propertyXXX" type="int">
<column name="ColoumnXXX" />
</key-property>
<key-property name="YYY" type="int">
<column name="ColoumnYYY" />
</key-property>
</composite-id>
...
</class>
The issue was discussed on the forum in topic
http://forum.hibernate.org/viewtopic.php?t=989476
--
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