I've investigated what you saw in InheritanceTest. It's due to the fact that you were not testing the right thing.
Your test basically calls result.toString() which triggers the object loading. After that, javassist's proxy simply delegates toString() to an actual strawberry object.
2. result is:org.hibernate.jpa.test.inheritance.Strawberry@73947cfc
2. result is:org.hibernate.jpa.test.inheritance.Fruit_$$_javassist_50
I should have spotted that quicker but I'm a bit rusty on those subjects.
So yes only keep the find test and remove the getReference test from the pull request.
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
I've investigated what you saw in InheritanceTest. It's due to the fact that you were not testing the right thing.
Your test basically calls result.toString() which triggers the object loading. After that, javassist's proxy simply delegates toString() to an actual strawberry object.
Here is a proper test
The test fails right after printing
I should have spotted that quicker but I'm a bit rusty on those subjects.
So yes only keep the find test and remove the getReference test from the pull request.