-->
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: Middlgen Feature Request
PostPosted: Fri Dec 12, 2003 2:16 am 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:35 pm
Posts: 35
I have ran into a situation where many of the columns in the database that I am mapping to have int type columns that are nullable. ONe I ran into then was the mapping file set them as "int" and really I need type "Integer in order to stop Hibernate from complaining.

My feature request is that either middlegen determine this via DB META data or maybe a better solution is to always use java.lang.Integer or java.lang.Long, etc.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 4:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Thanks for the feature request. Middlegen core is providing the default selection values. I have been considering adding to the plugin smarter choices (such as this one) on top of the core provided mechanism. It is not that hard at all b ut need to be carefull that you not changing value that the users had selected (right or wrong). You are not the first to ask for this and yes I will do it (busy at the moment though).

In the mean time you can edit the properities file and replace int with integer with sed or some other tool.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 24, 2003 12:02 pm 
Regular
Regular

Joined: Tue Nov 11, 2003 7:35 pm
Posts: 63
Hello,

I recently implemented functionality to correct problems like this. My changes have been accepted and placed into CVS. You can check out the latest from CVS and use this new functionality.

I described how to use the new functionality in http://forum.hibernate.org/viewtopic.php?t=925700&highlight=. See the message about JavaTypeMapper. The sample file was also placed in CVS under the file HibernateJavaTypeMapper.java in the plugins/hibernate dir. Just point to this file in your hibernate ant task.

Cheers,
Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 25, 2003 7:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
This addition represents the start of plugins for the Middlegen Hibernate Plugin :-) I am sure this will be expanded as we move forward.


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.