[hibernate-issues] [Hibernate-JIRA] Created: (HBX-971) generate class-code without overwriting existing extra class-code

Christoph Mayerhofer (JIRA) noreply at atlassian.com
Thu Aug 9 10:32:13 EDT 2007


generate class-code without overwriting existing extra class-code
-----------------------------------------------------------------

                 Key: HBX-971
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-971
             Project: Hibernate Tools
          Issue Type: Improvement
          Components: hbm2java
    Affects Versions: 3.2beta9
            Reporter: Christoph Mayerhofer


I'm trying to re-generate my class-code from my database-schema without overwriting existing methods from my pojos. I think this isn't possible yet because the java-files are always overwritten after each generation. But there are 2 possibilities to get rid of this problem which are not very convenient in my opinion: 

(1) subclass the generated class with the @MappedSuperclass annotation and anotate the Subclass with @Entity and @Table.
(2) modify the generation templates or use the MetaAttribute "classCode" within the ReverseEngineeringStrategy.

The best approach would be that the generation scripts do not touch the extra class-code from the pojos. Perhaps someone of the developers can verify if this would be possible.

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