-->
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: Nullable types and MSSQL identity column
PostPosted: Thu Sep 22, 2005 5:09 am 
Hi!

I have a problem saving new object to database. Object's ID property is of type NullableInt32 and for new objects it is null. Now, when I try to save this object I get error that there was invalid cast exception when casting from System.Decimal to Nullables.NullableInt32.

But, I am able to retrieve such objects from database without problems. How to resolve this issue?

With best regards,
Gunnar Peipman


Top
  
 
 Post subject: Column in database
PostPosted: Thu Sep 22, 2005 5:11 am 
Sorry. I forgot to mention that column in database is of type int and it is identity column.


Top
  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 7:14 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Nullable ints are not supported as identity identifiers currently. See NH-306 in JIRA.


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.