-->
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: PersistentClass.getProperty(field) bug ?
PostPosted: Tue Jun 14, 2005 9:50 am 
Newbie

Joined: Tue Aug 24, 2004 5:36 pm
Posts: 16
Hibernate version: 2.1.6

Hi all,

in http://forum.hibernate.org/viewtopic.php?t=938516&highlight=persistentclass+getproperty
David showed a technique to resolve the mapped field length. As stated elsewhere in this forum, this technique works only for properties not in keys.

This technique will not work for a key-property in a composite id. The object returned by PersistentClass.getKey does not have something like PropertyClosureIterator as getPropertyClosureIterator returns, therefor one can only get Column iterator from the object returned by PersistentClass.getKey and the property information in the mapping is lost.

Any suggestion in solving this issue ? or maybe it is solved in version 3 ?

best regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 12:19 pm 
Newbie

Joined: Tue Aug 24, 2004 5:36 pm
Posts: 16
A possible work around is to add in xml mapping file a property with same attributes as the key-property that we want its length and marks it as insert="false" update="false"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 8:47 am 
Newbie

Joined: Tue Aug 24, 2004 5:36 pm
Posts: 16
from common sense, a key-property is a property and should be in the PropertyClosure Is' nt it ? what is the rationale for the actual implementation ?


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.