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
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
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