[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Validating schema

Hi,

I'd like to add a JUnit test which will validate persistence.xml and any associated database schema, annotations, etc. Is the following code enough?

EntityManagerFactory emf = Persistence.createEntityManagerFactory("MyPersistenceUnit");
EntityManager em = emf.createEntityManager();
em.close();


Or do I need to do anything special? Also, is there a way to disable this validate for production machines?

Thank you,
Gili