[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1036) XML Mapping support for generated Classes

Walter Dorninger (JIRA) noreply at atlassian.com
Sun Jan 20 18:28:57 EST 2008


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

Walter Dorninger commented on HBX-1036:
---------------------------------------

correct - I'm talking about adding some possibility to control the generation of the node tag - or even a more generic approach where one can add tags that are just passed though to the .hbm.xml file. 

I was already thinking of running an XSLT over the generated .hbm.xml file and just add a node attribute and use the same name as the property  name for the "node" value - however for many-to-one relationships this would not work anymore as there is no property name available - only the column name which is not the same. 
This would be an example of a generated class - i could loop over the properties and key-properties and add the name attribute to the column value as the node attribute - however for the many-to-one i do not have the propper name available (only the column name) when doing it using an XSLT on the hbm.xml
<class name="Account" table="ACCT" schema="REDHATN1GC">
            <key-property name="AccountID" type="string">
                <column name="ACCT_ID" length="12" />
            </key-property>
        </composite-id>
        <many-to-one name="issue" class="Issue" fetch="select">
            <column name="ISSU_ID" length="10" />
        </many-to-one>
        <property name="AccountOpenDate" type="date">
            <column name="ACCT_OPEN_DTE" length="7" not-null="true" />
        </property>
[...]

I also already had a look at the possibilities of a custom ReverseEngineeringStrategy - however it does not seem that it is possible to add a node tag there.


> XML Mapping support for generated Classes
> -----------------------------------------
>
>                 Key: HBX-1036
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1036
>             Project: Hibernate Tools
>          Issue Type: New Feature
>          Components: reverse-engineer
>    Affects Versions: 3.2.0.GA
>         Environment: any
>            Reporter: Walter Dorninger
>
> It would be a nice feature if it would be possible to include "XML Mapping" support when hbm files are reverse engineered. It seems that currently it is not possible to include the "node" tag in when tables are reverse engineered.

-- 
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