Skip to:
When using Session#setDefaultReadOnly to get read-only entities, the setting seems to be ignored when using named queries:
I have checked back to see when it stopped working and it was Hibernate 5.2.0.Final!
Reproducer is attached (or will be attached…).
We need to be careful here, since @NamedQuery(readOnly=true) lets you override the read-only mode. So it’s unclear which should take precedence.
@NamedQuery(readOnly=true)
When using Session#setDefaultReadOnly to get read-only entities, the setting seems to be ignored when using named queries:
I have checked back to see when it stopped working and it was Hibernate 5.2.0.Final!
Reproducer is attached (or will be attached…).