-->
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: hbm2java: Can I exclude a class from being generated?
PostPosted: Tue Nov 25, 2008 8:47 am 
Newbie

Joined: Tue Nov 25, 2008 8:21 am
Posts: 1
Hi all,

I'd like to know how to exclude a given class from being generated by hbm2java.

Background:
I have mapping files that define a simple hierarchy of classes. Creating these classes using hbm2java works fine. Now I'd like to provide implementations for two of these classes myself. That's why I'd like to exclude them from being generated by hbm2java.

Solutions I have tried:
For the time being, hbm2java writes files to a temp directory. Then I copy the files to a target directory, thereby ignoring those that I do not need.

Thanx,
Martin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 25, 2008 10:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Your solution is the best workaround ;)

An Alternative option is to set <meta attribute="generated-class">AbstractYourClass</meta> inside <class> and it will generate an abstract class which have all the apropriate getter/setters and then you can provide the concrete implementation.

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