-->
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: Joined subclass as the child of a ordered list
PostPosted: Tue Apr 19, 2005 8:02 pm 
Newbie

Joined: Mon Apr 04, 2005 7:33 pm
Posts: 3
I have a case where the joined-subclass (STRUCTURED) whose base class is Relationship participates in an ordered list of with another parent (Site).

Code:
|--------|             |--------------|
| Site   |             | Relationship |
|--------|             |--------------|
       |                      |
       | Ordered              |
       | List                 |joined-subclass
     |--------------------------|
     |         Structured       |
     |--------------------------|

The list statement in the Site.hbm.xml follows:

<list name="parts" lazy="true" table="STRUCTURED" cascade="all" order-by="DEPTH" sort="natural">
<key column="SITE_ID" />
<index column="ORDERING_DEPTH"
<element column="DEPTH" type="integer" not-null="true" />
</list>

If I don't specify the ORDERING_DEPTH property in the Structured joined-subclass, when the Structured class is saved the parameter index is out of range. There is one more parameter then is listed in the SQL. That parameter is the ORDERING_DEPTH setting. The SQL for the structured insert does not have the ORDERING_DEPTH field. The DDL table does have the ORDERING_DEPTH column and hibernate is attempting to set it.

If I do specify an ORDERING_DEPTH property, then during the insert hibernate fails to establish this field and I get a error for trying to save a non-nullable field in the insert.

Do I have the <list...> specified wrong? I have searched the documentation on <list> and it doesn't cover this situation - or at least I couldn't find it. Is there a known issue with using a list with a joined-subclass?


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.