-->
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: Add annotations from DelegatingReverseEngineeringStrategy
PostPosted: Sat Jul 02, 2011 7:24 am 
Newbie

Joined: Mon Aug 18, 2008 10:54 am
Posts: 11
Location: Devon, UK
I am using a custom reverse engineering strategy with Hibernate Tools, I have extended org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy and have been happily generating my classes from my Postgres database schema for sometime now.

However I now wish to add Hibernate Envers into the mix. Envers requires that I add @Audited annotations to my Classes, as my classes are generates by Hibernate Tools as part of my Maven Build, I would like to be able to add these annotations from my extension of DelegatingReverseEngineeringStrategy.

Can someone tell me how I programatically specify these annotations in my extended DelegatingReverseEngineeringStrategy, so that Hibernate Tools will add them to the classes it generates?

Thanks Adam.

_________________
Adam Retter


Top
 Profile  
 
 Post subject: Re: Add annotations from DelegatingReverseEngineeringStrategy
PostPosted: Tue Jul 19, 2011 9:03 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
You can't use DelegatingReverseEngineeringStrategy to add extra annotation.

You can use
1. "class-modifier" meta attribute
2. custom template (add your annotation to PojoTypeDeclaration.ftl).


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.