-->
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: component mapping
PostPosted: Thu Apr 08, 2004 2:06 am 
Newbie

Joined: Tue Feb 03, 2004 1:49 pm
Posts: 16
I am using the built hibernate 2.1.2, mysql 4, j2se1.4

I have a mapping that use.

Code:
        <component
            name="super"
            class="com.Superclass"
        >
        <property
            name="value"
            type="java.lang.String"
            update="true"
            insert="true"
            column="value"
            not-null="true"
        />
      </component>


Test 1. (use a instance of the Superclass.)
Code:
...
Superclass super = new Superclass();
super.setValue("1");
...
theobject.setSuper(super);
...
session.save(theobject);

Test 2. (use a instance of the Subclass of Superclass.)

Code:
...
Superclass super = new Subclass();
super.setValue("1");
...
theobject.setSuper(super);
...
session.save(theobject);



Result:
Test 1 ok.
Test 2 failed. null id in entry (don't flush the Session after an exception occurs)

Is this a bug?

_________________
mzoom@homealone


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 08, 2004 8:46 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Post it to JIRA with a simple working testcase (with main() method) please

_________________
Emmanuel


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.