-->
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: Enquiry about 'Auto' Generation Strategy
PostPosted: Thu Mar 08, 2012 11:48 pm 
Newbie

Joined: Thu Mar 08, 2012 11:29 pm
Posts: 2
Hi To All,

May be this will be a very basic question but i want to understand.

Suppose if we use the Generation strategy as 'Auto' and we are going to use the application in Oracle and MS SQL data bases.

Which Strategy will hibernate going to use in respective databases?

Will it use 'Table' Strategy in both data bases or 'Sequence' Strategy in Oracle and 'Identity' Strategy in MS SQL?

Is that advisable to use 'Auto' Strategy in large scale applications?

Thanks in Advance.

regards,
-karthik


Top
 Profile  
 
 Post subject: Re: Enquiry about 'Auto' Generation Strategy
PostPosted: Tue Mar 13, 2012 3:56 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
Will it use 'Table' Strategy in both data bases or 'Sequence' Strategy in Oracle and 'Identity' Strategy in MS SQL?


In MS-SQL I'm sure 'Auto' is using 'Identity' Strategy
whilst under Oracle I believe it uses a sequence as 'Identity' Strategy is not supported by Oracle.

Quote:
Is that advisable to use 'Auto' Strategy in large scale applications?


It depends to which concrete-strategy 'Auto' falls back on your concrete databases.
'Identity' Strategy is in my opinion not so good for applications which do massive inserts,
as with this strategy, every persist action requires an extra database hit to obtain the primary key
(in most other strategies the primary key is most times calculated without database hit).


Top
 Profile  
 
 Post subject: Re: Enquiry about 'Auto' Generation Strategy
PostPosted: Tue Mar 13, 2012 5:04 am 
Newbie

Joined: Thu Mar 08, 2012 11:29 pm
Posts: 2
Thank you very much pb00067 for your reply :)


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.