When im stepping over hibnerate objects with Intellij the objects appear to be null in the debugging window. Labelled as $$_hibernate_interceptor
So lets say I have some simple code that looks like the following
Subscription subscription = subscriptionRepository.getOne(1l);
log.info("add breakpoint debug code stopped here")
I would like to see what values that have been returned from the subscriptionRepository and assigned to the subscription object within the the Debug:
window.
See screenshot that shows what this looks like on my computer.
As you can see most of the Variable values appear to be empty, however if I do a toString() on the subscription object it will output values that are marked as null in the inteceptor window. So they are not really empty.
So couple of questions here
- What is
$$_hibernate_interceptor
Further findings
The interceptor is only returned when I use the default repository.getOne
. If I use findBy or my own findByField it does not call the interceptor and displays the values in the debug window.
What is happening here why does getOne display interceptor but the others dont?