Proxies in Hibernate are no longer created using CGLIB and they use a different class separator.
Becuase of that, Hibernate proxied classes are not unproxied when looking up, for example, for ResourceMetadata, and we get the wrong information back.
For example, hrefs for links of lazy loaded relationships end up using the default rel because the correct mapping is not found and, if we defined a custom rel in the repository, incorrect href will be generated
Affects: 3.1.3 (Lovelace SR3)
Issue Links:
DATAREST-1325 Raise minimum Hibernate dependency to 5.2
I just found out that spring-data-common has the concept of ProxyDetectors, I think that the use of ClassUtils.getUserClass() should be replaced by ProxyUtils.getUserClass() across the board in spring-data
I've also noted that the spring-data-rest-partent pom still references hibernate 4.3.10.Final as version to test against, it would probably be a good idea to upgrade that as well
That's in place. I've fixed the Hibernate upgrade in DATAREST-1325 as we cannot back-port this unfortunately. However, the fix for this ticket here can be back-ported and thus make Spring Data REST projects on Kay and Lovelace Hibernate 5.x compatible
spring-projects-issues commentedDec 19, 2018
alienisty opened DATAREST-1322 and commented
Proxies in Hibernate are no longer created using CGLIB and they use a different class separator.
Becuase of that, Hibernate proxied classes are not unproxied when looking up, for example, for ResourceMetadata, and we get the wrong information back.
For example, hrefs for links of lazy loaded relationships end up using the default rel because the correct mapping is not found and, if we defined a custom rel in the repository, incorrect href will be generated
Affects: 3.1.3 (Lovelace SR3)
Issue Links:
Referenced from: commits 13370f8, 747a949, 15056f1
Backported to: 3.1.4 (Lovelace SR4), 3.0.13 (Kay SR13)
The text was updated successfully, but these errors were encountered: