-->
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: many-to-one and null object
PostPosted: Tue Jun 23, 2009 1:30 am 
Newbie

Joined: Thu Jan 22, 2009 2:49 am
Posts: 13
Hello

In a class Bussiness am having a many-to-one relationship with class TaxOffice

Code:
<class name="Bussiness" table="BUSSINESS">
...
<many-to-one name="taxOffice"
                    class="TaxOffice"
                    lazy="false"
                    not-null="false"
                    column="TAX_OFFICE_ID"/>
...

</class>

<class name="TaxOffice" table="TAX_OFFICE">
....
</class>


How can i tell hibernate that object taxOffice is optional and sometimes must have null values?
I am using the not-null="false" but it does not work


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.