-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: generating classes and adding behavior
PostPosted: Wed Jun 14, 2006 5:38 am 
Newbie

Joined: Tue Jun 13, 2006 3:24 pm
Posts: 5
I am working on a project where we are using the *.hbm.xml as the basis for both generating the classes and the schema and we have hit a point where we really want to add behavior to the generated (persistent) classes.

Is there a best practice for this that either allows us to save modifications to the generated classes or to somehow use one class mapping at class generation time and another (the subclass with added behavior) at run time?

Since we have not yet solidified the object model, we don't want to blindly edit the generated classes.

Alternately, should we dump the *.hbm.xml-centric approach and move to generating that file from the java class?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 14, 2006 12:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use <meta attribute="generated-class">BaseXXX</meta> to generate an abstract class that you can extend.

if you don't want hbm.xml then use annotations.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.