-->
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.  [ 3 posts ] 
Author Message
 Post subject: Can't save object of mapping with <union-subclass>
PostPosted: Thu Jan 15, 2009 6:02 am 
Newbie

Joined: Thu Jan 15, 2009 5:51 am
Posts: 2
Hi Gurus,

I am new to Hibernate. Please help to have a look. Thanks in advance.

Hibernate version:
3.2.3.ga

Mapping documents:

Code:
<hibernate-mapping package="objects">
  <class name="OrganizationStructureObject" abstract="true">
     <id name="objID">
        <generator class="uuid.hex"></generator>
     </id>
     <property name="clientID" not-null="true"></property>
     <property name="name" not-null="true"></property>
     <property name="abbreviation" type="string" length="20"></property>
     <property name="description"></property>
     <property name="typeCode" not-null="true"></property>
     

     
     <union-subclass name="OrganizationUnit" table="TA_ORG_ORG_UNIT">
        
     </union-subclass>
     
     <union-subclass name="Person" table="TA_ORG_PERSON">
        <property name="userID"></property>
     </union-subclass>

      
     
  </class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
Code:
s.save(object);


Full stack trace of any exception that occurs:
No exception

Name and version of the database you are using:
MySQL 5.

The generated SQL (show_sql=true):
No SQL genernated.

Debug level Hibernate log excerpt:
Nothing

Problems with Session and transaction handling?
not a transcation issue because other object are saved correctly. Only objects with <union-subclass> were wrong.

After save(), the UUID was created correctly. But the objects were not saved into database. NO SQL output, no any other debug level info from hibernate.

Thanks a lot for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2009 8:14 am 
Newbie

Joined: Thu Jan 15, 2009 5:51 am
Posts: 2
no body has clues?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2009 10:11 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
did you call s.flush()?


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