-->
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: PropertyValueException with joined-subclass
PostPosted: Mon May 22, 2006 5:42 am 
Newbie

Joined: Mon May 22, 2006 4:49 am
Posts: 1
Hi,
I'm using joined-subclass to inheritance. All works well until I try to persist a new instance of a subclass, then I get a PropertyValueException that seems to reference Hibernate's internal link from the subclass to the super-class.

Can anyone tell me how to make this work?
Thanks
Brian

Hibernate version: 3.1.3

Mapping documents:
<?xml version="1.0"?>
<!-- Contains mappings for Case and all its subclasses -->
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
>
<hibernate-mapping package="uk.co.barclays.dd.dto">
<class name="Case" table="dd_t_Cases">
<id name="id" column="CASE_ID" >
<generator class="sequence">
<param name="sequence">SEQ_DD_Cases</param>
</generator>
</id>
<property name="caseType" column="CASE_TYPE" />
<property name="description" column="DESCRIPTION" />
<!-- Query subclass -->
<joined-subclass name="GeneralQuery" table="DD_T_QUERIES">
<key column="CASE_ID"/>
<property name="text" column="QUERY_TEXT" />
</joined-subclass>
</class>
</hibernate-mapping>


Full stack trace of any exception that occurs:
org.hibernate.PropertyValueException: not-null property references a null or transient value: uk.co.barclays.dd.dto.Transfer._casesBackref
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:530)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:514)
at uk.co.barclays.dd.dao.CaseDAO.add(CaseDAO.java:49)


Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):
None


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.