-->
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.  [ 4 posts ] 
Author Message
 Post subject: seam generateentities how to annotate variable, not methods?
PostPosted: Fri Jun 12, 2009 2:34 am 
Newbie

Joined: Sat Feb 28, 2009 9:38 am
Posts: 4
Hi,

Does anyone know how to make seam generate-entities annotate the variables and not the methods when I reverse engineer from my mysql database.

I want the annotation to be on the member variable in the class like this, but it doesn't make it like this.

Code:
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "caldav_server_id")
private CaldavServer caldavServer;


Any help greatly appreciated,

Thanks, Philip


Top
 Profile  
 
 Post subject: Re: seam generateentities how to annotate variable, not methods?
PostPosted: Fri Jun 12, 2009 7:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
update the templates in hibernate-tools to do one or the other depending on a property and submit a patch since it would be cool to have.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: seam generateentities how to annotate variable, not methods?
PostPosted: Sun Jun 14, 2009 3:23 am 
Newbie

Joined: Sat Feb 28, 2009 9:38 am
Posts: 4
Hi,

I don't know where to start. I downloaded it from subversion and looked in hibernatetools\tools\src\templates\hbm and I think I have to change something in there but not sure which file to change.

Phil


Top
 Profile  
 
 Post subject: Re: seam generateentities how to annotate variable, not methods?
PostPosted: Sun Jun 14, 2009 8:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
No, /hbm is for the hbm.xml files. You want to be looking in /pojo which is for the pojo generation.

In here look for files with names that contains field or properties.

Some of the generation for annotation is actually also done in java code, but for moving the annotations to fields instead of getters I don't think that will be relevant.

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