-->
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: Problem combining property-ref and discriminator
PostPosted: Tue May 30, 2006 4:25 am 
Newbie

Joined: Fri May 26, 2006 6:22 am
Posts: 3
I have a mapping file containing different subclasses based on a discriminator value.

<class name="Kode" table="KODE">
<id name="Id" type="Int32">
<generator class="assigned" />
</id>
<discriminator column ="NAME" type="String"/>
<property name="Code" column="KODE" type="String" unique="true"/>
<subclass name ="TypeAccount" discriminator-value="ACCOUNT"/>
</class>

I want to use a property-ref to link the Accounttype to the Kode using the Code property, like this:

<many-to-one name="Type" column="ACCOUNTTYPE" class="TypeAccount" property-ref="Code"/>

But I always get the error that the Code property cannot be found in the TypeAccount class.

Isn't it possible to combine the property-ref attribute with a subclass based on a discriminator value?


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.