-->
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: About field annotated with @Transient
PostPosted: Mon Oct 13, 2008 11:09 pm 
Newbie

Joined: Sat Jul 01, 2006 9:38 pm
Posts: 17
Code:
public class A{
        private List<InstanceIdentifier> observationPrimaryIds=new ArrayList<InstanceIdentifier>();

   @Transient
   @Field(name = "observation.primaryId.extension")
   @FieldBridge(impl = ObservationPrimaryIdsFieldBridge.class)
   public List<InstanceIdentifier> getObservationPrimaryIds() {
      return this.observationPrimaryIds;
   }
}


As described above, I have this kind of field, the index can be saved well. But if I saveOrUpdate(A) when observationPrimaryIds is not set, the observation.primaryId.extension index which had something will be empty.

My question: Can field be omitted when save or updated if not modified?

Thanks in advance.

--suyejun


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 22, 2008 9:20 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

is this not what one would expect? If you have an existing entity with a non empty list of observationPrimaryIds and set this one to null, Hibernate Search assumes that the observationPrimaryIds have been removed.

Or is there a misunderstanding?

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2008 9:52 pm 
Newbie

Joined: Sat Jul 01, 2006 9:38 pm
Posts: 17
Thank you, Hardy
I misunderstood the mechanism.


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.