-->
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: Joined subclass type is invalid. How to solve this problem?
PostPosted: Wed Feb 15, 2006 4:33 am 
Newbie

Joined: Mon Aug 29, 2005 2:13 am
Posts: 7
Hibernate version:3.1.2
Name and version of the database you are using:Sybase ASE 12.5.2
The generated SQL (show_sql=true):
------------
I have such mapping:

<class name="NodeElement" table="nodes_elements">
<id name="id">
<generator class="native" />
...
</id>
<joined-subclass name="Page" extends="NodeElement" table="pages">
<key column="node_element_id" />
...
</joined-subclass>

<!-- more joined sublasses -->

</class>

In code, when I create Page object, it is saved OK, but
when I read Page object ( it is readed fine ) instanceof Page returns false
and page.getClass().getName() returns xxx.NodeElement$$EnhancerByCGLIB$$1f06513e.

How can I test which of joined subclasses I have?


Top
 Profile  
 
 Post subject: Solved
PostPosted: Wed Feb 15, 2006 4:44 am 
Newbie

Joined: Mon Aug 29, 2005 2:13 am
Posts: 7
The problme was not in subclass mapping, but in using of it.
Thats how property using my NodeElement was mapped:
<many-to-one name="nodeElement" column="node_element_id" not-null="false" />
and the only thing I added was fetch="join" and thats all! problem solved.
Sorry for panic. :)


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.