-->
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: How to annotate recursive mapping in hibernate search?
PostPosted: Fri Oct 29, 2010 7:04 pm 
Newbie

Joined: Fri Jun 11, 2010 3:00 am
Posts: 14
I am unable to figure out how to add annotations in case of same class is used as parent and child entity. Here is example

@Indexed
public class Space{

@DocumentId(name = "spaceId")
private Long id;

@Field(name="spaceName", index = Index.TOKENIZED, store = Store.NO)
private String name;

@Field(name = "spacePermissions", index = Index.TOKENIZED, store = Store.NO)
private String permissions;


private Space parent;

private Set<Space> folders;
}

I have also configured 6 listeners for insert/update/delete (also for collections) and flush events.

I tried several combinations by having @ContainedIn and @IndexedEmbedded on both parent and folders. It generates indices properly on insert and delete of a folder. But on update a folder, it is not generating indices with updated folder/space name;

My search is unable to find the updated folder. What am I missing here?


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.