[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-971?page=co...
]
Max Rydahl Andersen commented on HBX-971:
-----------------------------------------
1. is definitly the simplest and easiest to gurantee to work (and it should actually be
made to work if you use meta attribute generated-class
2. this is just for small stuff...
3. this require something like jmerge or other tooling that can modify the AST correctly.
jmerge doesn't support JDK 5 yet though afaik so I haven't bothered implementing
it yet.
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira