| OK, I was able to narrow the difference. The bug is fully reproduced in the project I linked (https://github.com/flozano/hibernate-hhh13760/ ) Basically the difference is that with initialized lazy properties the exception is the same as I get in my production code (cast exception), whereas with non-initialized lazy properties, the exception is different (unexpected field type)… but they’re all the same: at some point, what is expected to be a long is actually an entity. |