To deal with lazy loading Hibernate uses proxy objects.
Pitfalls for this approach have been documented. Basically the instanceof operator can fail on a sublcass of an entity.
The bug ticket on this has been rejected, with typical JBoss flair:
If you think this through a bit more carefully, you will see why it is impossible.Still JPA compliancy requires the instanceof operator to work correctly.
Gavin King
Here are some ways to deal with the proxies:
No comments:
Post a Comment