-->
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: ono to one/PropertyAccessException
PostPosted: Thu Mar 17, 2005 7:17 am 
Beginner
Beginner

Joined: Thu Mar 03, 2005 5:01 am
Posts: 33
Location: Wrocław (Poland)
Hibernate version: H3 RC1

Code:
<class name="A" table="A">
   
    <id name="id" column="ep_id" type="integer" unsaved-value="null">
      <generator class="increment" />
    </id>     
    <property name="typ" column="ep_typ" type="string" length="10" />
    <property name="data" column="ep_data" type="date" not-null="true" />
     
    <joined-subclass name="AB" table="AB">
      <key column="cza_id" />
      <property name="x" column="cza_x" type="integer" not-null="true" />
    </joined-subclass>

    <joined-subclass name="AC" table="AC">
      <key column="czz_id" />     
      <one-to-one name="classAB"
         class="AB" foreign-key="cza_id"/>
    </joined-subclass>

</class>


I've no idea how to map 1:1 association between AB and AC classes? I tried to do it various ways, but when I load data from database, I always got PropertyAccessException

Quote:
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of AC.classAB


any suggesions? Thanks in advance!

_________________
bimki


Top
 Profile  
 
 Post subject: additional question
PostPosted: Thu Mar 17, 2005 5:31 pm 
Beginner
Beginner

Joined: Thu Mar 03, 2005 5:01 am
Posts: 33
Location: Wrocław (Poland)
additional question :

how to write this relation to be bidirectional?
I'm not going to show You my solution, becouse I always got PropertyAccessException...

_________________
bimki


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.