[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1081) Generation of meta attributes for composite-id

Norman Franke (JIRA) noreply at atlassian.com
Wed Aug 3 14:54:03 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43170#comment-43170 ] 

Norman Franke commented on HBX-1081:
------------------------------------

I second the vote for tableToMetaAttributesForCompositeId. That would be very, very useful. I use a ReverseEngineeringStrategy and a regeng.xml to generate the annotate POJOs directly without .hbm.xml files.

> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list