-->
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: need help in extending IdentityGenerator
PostPosted: Wed Dec 12, 2007 5:27 am 
Regular
Regular

Joined: Fri Nov 07, 2003 6:31 am
Posts: 104
Location: Beijing, China
I need to be able to force ID on tables using Identity generator. While I can control the database (set IDENTITY_INSERT ON & OFF in my case on SQLServer), I can't tell hibernate to actually put the ID field in the generated queries.
The best solution I can see would be to extend IdentityGenerator and add a verification: is the ID field is not NULL, include it in the query.

Does any body has experience in implementing IdentifierGenerator?
If the contract is simple, the IdentityGenerator implementation is quite complexe.
And I don't see why not, but if someone think my solution wouldn't work please let me know!

_________________
/nodje


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