Just ran into a problem that I've not seen in 10 years of running ObjectDb:
java.lang.IllegalArgumentException Attempt to refresh a non managed entity object (error 635)
Nothing changed in my code, but I'm wondering if there is a problem with the config file, and /or my recent experiments with Intellij's JPA database explorer, which required me to use a JPA persistence.xml configuration file.
(I was able to use to run objectdb queries from inside Intellij).
At any rate, it's made me wonder what the best practise is with this issue in general, and with EntityManager in particular.
Specifically: is it advised to use a new EntityManager with every transaction, or to use one, and clear() it with every transaction (in an application with one thread handling all the business logic) ?