Hi Guys,
I'm working in an environment where each client has your own database schema, but all of them with the same tables.
To use JPA(w/ hibernate behind the scenes) I'm creating the EntityManagerFactory using Ejb3Configuration.
So far so good, but I have a lot of classes, all of them mapped in my persistence.xml file.
I would like to know if it is possible to use the addResource method(of Ejb3Configuration class) to include the mapped classes in my EntityManagerFactory.
I tried it, but without success.
I'm receiving a message that indicates that my classe is not mapped
Code:
Unknown entity: br.com.netsar.model.entity.MasterCountry
I believe that it is occurring because the Ejb3Configuration was not able to read my persistence.xml file (no exception nor logging), I saw that is possible to use orm.xml as configuration resource.
I would like to know if I can do it with persistence.xml.
Thanks for your time,
Pedro