On 13/02/19 15:04, Matthew Broadhead wrote:
i am trying to test some business logic that depends heavily on the
results of calls to entitymanager. i would like to keep the
persistence.xml exactly as it is in the main project but basically
load in a different database underneath. is there a way to initialise
the entitymanager and point it to a development database for the
duration of the tests?
Hi Matthew,
I normally do as you require above, but with some Spring ORM support,
not sure it fits with your scenario; if so, I can point you to some
working samples.
Regards.
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/