In PlayOrm, Why there are two entry points for the application? The initialization in test cases does not happen through NoSql’s initialize() method while we are kind of replicating the same logic again in Bootstrap.
In PlayOrm, Why there are two entry points for the application? The initialization in
Share
Great question. If you use playframework with playOrm, the single entry point you should be using is NoSql.em(). That is for playframework only really though I wonder if that could be used in any webframework. As long as the framework supports PlayCallback and they can get the request form some threadLocal, NoSql.java should be supported in any web framework.
The other interface is pretty much equivalent to hibernate. Bootstrap == Persistence.java pretty much, so the test cases of course use Bootstrap to get the EntityManagerFactory. NoSql.java also uses Bootstrap.java to get the EntityManagerFactory.
later,
Dean