[hibernate-issues] [Hibernate-JIRA] Closed: (HBX-422) HBM2Java generates Interfaces for table and column names.
Max Rydahl Andersen (JIRA)
noreply at atlassian.com
Fri Sep 15 07:48:24 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-422?page=all ]
Max Rydahl Andersen closed HBX-422:
-----------------------------------
Resolution: Won't Fix
doesn't do it properly
> HBM2Java generates Interfaces for table and column names.
> ---------------------------------------------------------
>
> Key: HBX-422
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-422
> Project: Hibernate Tools
> Type: Improvement
> Components: hbm2java
> Environment: hibernate tools 3.1 alpha 5
> Reporter: sergiu gordea
> Priority: Minor
> Attachments: patch.txt
>
>
> I updated the Hibernatetooltask and PojoExporter class in order to generate an Interface for each mapped class.
> The interface contains the table in whic the class is stored and the column names for each property.
> I created IPojo.vm velocity template for implementing it.
> I think this is an usefull feature, and it will be good practice to use this constants instead of hard coded column names
> when querying the database. In this way, any change in the database structure will be catched by java compiler instead of
> trowing an exception on runtime.
> I created a new configuration and I uncommented the testHbm2JavaConfiguration() method.
> I use as input a file from /test/input .. folder.
> Maybe the functionality can be reviewed and improved by one of the developers who knows better the core code and
> introduce it in the next realease. I'll be very happy to see it integrated.
> Maybe some documentation will be needed to be updated too.
> Best,
> Sergiu
--
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