-->
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: id type problem when generating mapping files
PostPosted: Sat Nov 01, 2003 7:21 pm 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
I have all my tables with primary keys of type INT8 in a Postgres database.
When I use Middlegen-Hibernate-r2 to create my mapping files, I get some id's mapped with type="long" (which is correct) and other id's with type="int". Is this solved in the near release of r3?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 02, 2003 2:20 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
R3 has been released. Middlegen chooses the defaults and you have the option to change it using the GUI. I suggest you launch it in GUI mode and change what is not appropriate. I may in the future include a default list for various dialects but this is not going to nesessarily satisfy all users.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 02, 2003 4:02 pm 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
david wrote:
R3 has been released. Middlegen chooses the defaults and you have the option to change it using the GUI. I suggest you launch it in GUI mode and change what is not appropriate. I may in the future include a default list for various dialects but this is not going to nesessarily satisfy all users.



Ok. But I'm dealing with 110 tables and the GUI gets a bit cluttered. My question is how does Middlegen chooses it's defaults? Because if it does, then the mapping files would have type="int" or type="long" in all of them.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 02, 2003 6:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The defaults are chosen only if the table has not been found before and it selects from a list of possible types including conversion types. It then uses the property preferences file to get the values. I would suggest you edit the property preferences file to set the values that you want. A sed script or other equivalent will do the job.


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.