romain (3) [Avatar] Offline
#1
Hi folks,

I'm using hibernate search 3.0.1.GA (shipped with seam 2.1.1.GA).

I just bought the book (great job guys). The class I'm trying to index has many association to index too and I'm getting this exception :

Caused by: javax.ejb.EJBException: org.hibernate.HibernateException: cannot simultaneously fetch multiple bags

every time I try to add more than 1 association.

I provided more details here :

http://forum.hibernate.org/viewtopic.php?t=993418

I read §5.4 and my implementation is based on the advices in §9.1.3 (Optimizing mass indexing).

I don't really get this :

Use @BatchSize or FetchMode.SUBSELECT when a direct join cannot be used.

Could you provide exemple please ?

Thanks for your help and happy 2009 !

Best,

Romain
romain (3) [Avatar] Offline
#2
Re: Mass Initial indexing issue with a class with many associations
OK, It finally works.

Changing Collection or List to Set (and HashSet) will do the trick.
emmanuel.bernard (101) [Avatar] Offline
#3
Re: Mass Initial indexing issue with a class with many associations
Yep, using a Set is usually the right trick and the right thing to do anyways.