-->
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.  [ 1 post ] 
Author Message
 Post subject: How to map portable AND native ID gene in JPA 2//Hib 4?
PostPosted: Thu Jun 28, 2012 7:08 am 
Newbie

Joined: Fri Jan 30, 2004 8:42 am
Posts: 6
I would like to have native and portable id generation on my JPA 2 entities, currently running Hibernate and MySQL

When using @GeneratedValue(strategy=AUTO), hibernate defaults to the "hibernate_sequence" table on MySQL, i would like IDENTITY

If i solve it using @GeneratedValue(strategy=IDENTITY), i loose Oracle/Postgres portability

How can i set Hibernate to use IDENTITY as default for mysql when @GeneratedValue strategy=AUTO?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.