-->
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: Define values for property
PostPosted: Wed May 11, 2005 5:02 am 
Newbie

Joined: Fri May 06, 2005 4:26 am
Posts: 1
Hi.

My hibernate-mapping looks like this one:

<hibernate-mapping>
<class name="java-class" table="table_1" >
<id name="instanceId" column="instance" type="string"/>
<property name="height" column="height"/>
<property name="width" column="width"/>
<property name="depth" column="depth"/>
</class>
</hibernate-mapping>

Now i want to map another database column with this mapping.
For this column doesn't exist a property in the java class, but i know that the value always must be "3".
My problem is, that the java class cannot be modified. Is it possible to define a value inside the mapping for this column?

For example:
<property value="3" column="length"/>

Hope there is a solution and you can help me.

steffen


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 23, 2005 3:12 am 
Beginner
Beginner

Joined: Fri Feb 11, 2005 12:03 pm
Posts: 48
Location: Kiel, Germany
Hi,

if you cannot change the class, perhaps you can subclass it and provide the new method in the subclass?


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.