Skip to main content

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


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();

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

Thank you,

Back to the top