-->
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.  [ 3 posts ] 
Author Message
 Post subject: Reverse Engineering constant variable
PostPosted: Tue Sep 29, 2009 2:17 pm 
Newbie

Joined: Tue Sep 29, 2009 1:47 pm
Posts: 1
Hello,

I tried to generate the POJOs with Eclipse plugin Hibernate Tools and I'm very surprised by the code generated. It doesn't include the declaration of constant variables affected by the name of the differents properties of the table.This is very useful to write hibernate criteria request!!!

Exemple of code generate with Hibernate Synchroniser :
public static String REF = "JourAffectation";
public static String PROP_COMMENTAIRE = "Commentaire";
public static String PROP_UTILISATEUR_CREATION = "UtilisateurCreation";
public static String PROP_DATE_DERNIERE_MODIF = "DateDerniereModif";

Where can i define parameters to generate this code with Hibernate Tools ? in .ftl files?


Top
 Profile  
 
 Post subject: Re: Reverse Engineering constant variable
PostPosted: Wed Sep 30, 2009 6:46 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Quote:
constant variables affected by the name of the differents properties of the table.


Do you mean here the names of the columns as constants?

Quote:
Where can i define parameters to generate this code with Hibernate Tools ? in .ftl files?


Yes. See package templates.pojo.


Top
 Profile  
 
 Post subject: Re: Reverse Engineering constant variable
PostPosted: Mon Oct 05, 2009 2:36 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I think actually there is a patch contributed to do this - but not sure if it does it right (i.e. put the constants in a separate interface from the pojo's)

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