-->
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: HSearch:@IndexedEmbedded index only one item of @ManyToMany
PostPosted: Thu Jan 24, 2008 6:20 pm 
Newbie

Joined: Thu Jan 24, 2008 6:00 pm
Posts: 2
HS 3.0.0, Hibernate 3.2.5.

I have this in class Item (@Entity @Indexed):

@ManyToMany(fetch=FetchType.LAZY)
@JoinTable(..)
@IndexedEmbedded
private Set<ItemAttribute> itemAttributes = new HashSet<ItemAttribute>();

And in ItemAttribute (@Entity @Indexed):

@ContainedIn
@ManyToMany(mappedBy = "itemAttributes", fetch=FetchType.LAZY)
private Set<Item> items = new HashSet<Item>();

But after (re)indexing Item and ItemAttribute in Item's document there is only one "itemAttributes.id" field (there are many such entries in this collection).

I do this like Emmanuel shows here:
http://forum.hibernate.org/viewtopic.php?p=2355390&sid=6935eab714288da2ce912541e691eeac

but it's not working (anymore?).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 24, 2008 6:52 pm 
Newbie

Joined: Thu Jan 24, 2008 6:00 pm
Posts: 2
Shame on me, please ignore. I was performing Criteria's eager fetch on itemAttributes collection, which lead to shattering of this collection.


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.