Issue Type: Bug Bug
Affects Versions: 4.2.0.Beta2, 4.1.1.Final
Assignee: Guillaume Smet
Components: engine
Created: 05/Dec/12 3:47 AM
Description:

Hi,

Following our recent posts on using Lazy initialization with Hibernate Search, we have one (hopefully) final problem: when we have a complex hierarchy of @IndexedEmbedded and @ContainedIn using polymorphism, we have an exception in the ReflectionHelper.getMemberValue() call of AbstractDocumentBuilder.appendContainedInWorkForInstance().

In our example, we reference a field which is in the child class and the lazy Javassist proxy is based on the parent class, so when you try to get the member value via reflection, you have an exception as the field doesn't exist in the proxy.

We fixed the issue by unproxying the instance before manipulating the object.

Pull request to come, with a test case contributed by my colleague Yoann Rodière (corporate CLA on its way).

Project: Hibernate Search
Priority: Major Major
Reporter: Guillaume Smet
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira