-->
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: [Hibernate Search] Index updated when column update="false"
PostPosted: Wed Apr 28, 2010 5:28 am 
Newbie

Joined: Fri Oct 10, 2008 9:17 am
Posts: 13
Greetings,

We're experiencing an issue with mismatch between the database and Hibernate Search index when configuring properties with update="false"

We configure our object mapping using xml, and of course configure the index setting with annotations.

In one of our objects we have the following mapping configuration:

<property name="rank" column="rank" type="integer" update="false" />
<property name="topLevel" column="level" type="boolean" update="false" />

The problem is we also want these properties to be indexed, with the value that was initially set when the object was first persisted (hence update=false).

When we later update the object, those properties in the database remain unchanged as we require, but the index is updated with the new values! (zero).

Is there anyway we can get the Hibernate Search index to behave in the same manner?

Regards,


Top
 Profile  
 
 Post subject: Re: [Hibernate Search] Index updated when column update="false"
PostPosted: Thu Apr 29, 2010 6:25 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
you can do it, but at the cost of some duplication: there's not an option similar to "update=false" specific for indexes.
You could index a second field, which you set to the original value on load; seems an easy workaround.

_________________
Sanne
http://in.relation.to/


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.