-->
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: Error mapping to a null value
PostPosted: Tue May 12, 2009 7:20 am 
Newbie

Joined: Tue May 12, 2009 7:11 am
Posts: 1
Hi all,

I'm new to hibernate and I'm having trouble with a many-to-one mapping. Our database contains a mixture of null values and single spaces which represent a null. Unfortunately this is something that we can not change. When we run our query Hibernate finds a single space and attempts to find this value as a primary key in the other table and obviously can't find this result. What would be ideal is a method of telling Hibernate that a ' ' in the table represents a null. We have looked at using filters and custom selectors but can't see how this would work.

I looked through the faq and the tutorials and couldn't find a solution. If i have missed the solution somewhere in the documentation please post a link and i will close this topic.

Thanks,
A


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.