-->
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: Marking a specific foreign key value as null
PostPosted: Wed Mar 02, 2005 1:14 pm 
Beginner
Beginner

Joined: Tue Aug 17, 2004 5:06 am
Posts: 46
Hibernate version: 2.1

Name and version of the database you are using: MS SQL Server with a bizarre Navision Schema that prohibits null-values in columns

I am facing a rather stupid problem when using Hibernate on a MS SQL Server database that hosts a Navision database schema. Besides other nice ideas Navision does not allow a database column to be null, so we have to invent null-values.

Normally we use 0 for null if it's a numeric field. Unfortunately one of these numeric fields is part of a foreign key field, so Hibernate thinks that there's an object associated (the key is technically not null) and fails once the proxy gets initialized (because the key points to no record).

My question is: Is there any means of telling a relationship which key values are to be interpreted as null ?


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