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: <version> column in joined-subclass
PostPosted: Tue Mar 06, 2007 5:42 pm 
Newbie

Joined: Tue Mar 06, 2007 5:28 pm
Posts: 6
I have two tables joined using joined-subclass: Record and Item.

Record has a Record Name, and Item adds Title and Due Date.

A simplified version of the mapping:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Test.Record" table="Record" lazy="false">
<id name="RecordId" column="RecordId">
<generator class="assigned" />
</id>
<property name="RecordName"/>
<joined-subclass name="Test.Item" table="Item" lazy="false">
<key column="ItemId"/>
<property name="ItemTitle"/>
<property name="DueDate" />
</joined-subclass>
</class>
</hibernate-mapping>

The version column is found on Item.Version, type Sql Server timestamp. However, if I try to add a <version> element to the joined-subclass, the configuration loader throws.

Message: The element 'joined-subclass' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'version' in namespace 'urn:nhibernate-mapping-2.2'.

This is an existing database; schema changes are a barrier.

Is there a way to use joined-subclass where the version column is stored on the child table?


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.