-->
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: Hibernate, Oracle, JDBC datatypes Best Practices?
PostPosted: Mon Oct 03, 2005 1:01 pm 
Beginner
Beginner

Joined: Thu Aug 04, 2005 2:24 pm
Posts: 45
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


In order to get the best performance and avoid possible data loss, i'm making a research as to the best datatypes to be used on all sides, database, java and hibernate.

Because of that, i would like to know if there's anything on Hibernate side that i should take care of...

Are there any Best Practices on that matter?

Thanks a lot to all.

_________________
Eduardo Mylonas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 7:17 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Although Hibernate supports either, I (indeed most people) find that it is safest to use object types (Long, Boolean) rather than primitive types (long, boolean) for a number of reasons. They more accurately reflect a null state in the db, for one thing. Also, if you intend to use query-by-example, you'll need properties that are nullable so that you can omit them as query parameters.

Hope this helps you out,

Chris


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.