Hello,
This is a followup of HSEARCH-1030 fixed a while ago by one of my colleagues (Laurent Almeras).
We have the very same problem with the Mass Indexer in the following case:
Root Entity -> @IndexEmbedded -> Entity -> @ManyToOne(fetch = FetchType.LAZY) with @FieldBridge.
The main problem is that the object should be unproxied before the injection in the field bridge code in DocumentBuilderIndexedEntity.
Once you have done that, you need to override unproxy in HibernateSessionLoadingInitializer to inject a session in the initialization.
We have a pull request ready with a test case and a patch. We'll post it once we have the patch number.
I signed a personal contributor agreement a while ago but, as this work was done on my employer time by my colleague Stéphane Gleizes and me, I think we need to sign a corporate agreement.
Feel free to ping me on this subject.
By the way, this patch should be backpatched in 4.1.x if possible.
|