-->
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: Can we specify <map>'s <index> update="fals
PostPosted: Sat Jun 25, 2005 10:14 am 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
Is it hard to allow this?

Code:
<map>
    <key.../>
    <index column="CODE" type="AnsiString"  insert="false" update="false" />
    <one-to-many class="CountryCode" />
</map>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 26, 2005 1:54 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Well, it won't be so trivial and it also looks quite suspicious to me to have maps whose elements are updated, but indices aren't...

Maybe a more "explicit" design would be better? Some object that has a method CountryCode GetCountryCode(string code) and whose implementation uses an NHibernate query.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 26, 2005 2:50 pm 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
the "explicit" way is what we are taking now. I am just thinking, in doing this way, we cannot just make use of what Hashtable already provided.

Anyways, it's just my personal feeling, I can understand why Hibernate is doing this way, just in this way, <map> is really seldom used, as I discribed in my previous post: Usually, I put "id" as the index, and when I remove a child from a one-to-many <map>, I don't expect the child object's id be removed.

But, if it is not a trivial change, I am not pushing it.

Thanks anyways.


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.