-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate search - indexes not updated
PostPosted: Thu Jan 19, 2012 8:22 am 
Newbie

Joined: Thu Jan 19, 2012 8:15 am
Posts: 1
Hi All,

We have a server using spring and hibernate. We are trying to add hibernate search to the server but run into the following problem.
We have a class Request with a relation to a single Customer. This is annotated like so:

Request:
Code:
@Entity
@Table(name = "requests")
@Indexed(index = "indexes/requests")
public class Request extends BaseDomainEntity
    @ManyToOne
    @IndexedEmbedded   
    private @Getter @Setter Customer customer;
}


Customer
Code:
@Entity
@Table(name = "customers")
@Indexed(index = "indexes/customers")
public class Customer extends BaseDomainEntity {

    @Column(name = "name")
    @Field(index = Index.TOKENIZED, store = Store.NO)   
    @NotEmpty
     private @Getter @Setter String name;

    @OneToMany(mappedBy="customer")
    @ContainedIn
    private @Getter @Setter List<Request> requests;
}


When i create a request i can see with Luke that the index is created and that the customer related to the request is added to the index of the request.
When i update the customer (by changing its name) the index of the customer is updated, the index of the request with the related customer not.
If i have read the documentation correct the @containedIn should do this for me right?

We use hibernate 3.6.2.Final and hibernate search 3.4.1.Final


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.