-->
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.  [ 2 posts ] 
Author Message
 Post subject: OneToOne Beziehung Problem null-Werten
PostPosted: Thu Jan 24, 2008 5:49 pm 
Regular
Regular

Joined: Thu Jun 08, 2006 5:32 pm
Posts: 52
Hi, ich habe folgendes Problem:
Eine Klasse Category hat eine Referenz auf die übergeordnete Category. Diese Referenz kann jedoch null sein (Wenn es sich um eine Haupt-Category handelt).

Mein mapping sieht wie folgt aus:
Code:
@OneToOne(optional=true)
@JoinColumn(name="PARENT_ID")
private Category parent;


Hibernate wirft folgende Exception, wenn parent == null ist:
Code:
java.lang.IllegalArgumentException: entity for parameter binding cannot be null


Wie löse ich am besten das Problem?

Vielen Dank im voraus :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 26, 2008 6:46 pm 
Regular
Regular

Joined: Thu Jun 08, 2006 5:32 pm
Posts: 52
Hat noch niemand das Problem gehabt? Glaub ich nicht.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.