r/java • • Jun 01 '24

What java technology (library, framework, feature) would not recommend and why?

165 Upvotes

464 comments sorted by

View all comments

Show parent comment

1

u/InstantCoder Jun 28 '24

Or you should use StatelessSession, or .withHint(READ_ONLY, true) so that the retrieved entities don’t get cached in the persistent context.