set up entity manager factory