-->
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: Native generator not working
PostPosted: Wed Jun 04, 2014 1:14 pm 
Newbie

Joined: Thu Jan 29, 2009 3:57 pm
Posts: 5
I am using Hibernate 4.3.5. I am using the Derby database and using the native generator for the primary key. Here the configuration in the hbm file:
<id name="isbn" column="col1" type="long">
<generator class="native">
</generator>
</id>
I also created the default 'hibernate_sequence' sequence in derby.
This does not generate the id and it assigns null to the value. I get the following error : Column 'col1' cannot accept a Null value.

I am able to generate the id values using 'sequence' and 'increment' generators.

Can someone let me know if I need to configure anything else for the native generator?

Thank you


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.