-->
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: UserType not-null problem
PostPosted: Thu Jan 14, 2010 11:45 am 
Newbie

Joined: Mon Dec 28, 2009 6:14 am
Posts: 6
Hello!

I have created UserType with multiple columns (a multilingual string property).
Everything is OK, except that when I set property to "not-null" nothing changes - I can still save null values without exception.
How can this be solved?

Thanks!


Top
 Profile  
 
 Post subject: Re: UserType not-null problem
PostPosted: Fri Jan 15, 2010 6:53 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Try to set property
hibernate.check_nullability
to true in your configuration file.
Which version of Hiberante are you using? (I noticed that with Hiberante 3.5, the default for this property has suddenly become false)
Please let me know, thanks.


Top
 Profile  
 
 Post subject: Re: UserType not-null problem
PostPosted: Wed Jan 20, 2010 3:05 pm 
Newbie

Joined: Mon Dec 28, 2009 6:14 am
Posts: 6
hibernate.check_nullability=true doesn't help.
I am using hibrnate 3.3.2 and nullability check works for ordinary properties but not for the multi-column UserType.

As I now see this is because not-null="true" doesn't mean that hibernate should check nullability itself but it should create a NOT NULL constraint which is useless in case of multiple columns.


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.