Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Re: How to generate JPA xml using EclipeLink Workbench ?

 if You design a OR mapping by the EclipseLink workbench and You want to use this for JPA. You should set the property eclipelink.session-xml (value=classpath of sessions.xml) in the persistence.xml. The session.xml file should refer the project.xml file (Your OR mapping file).
(see 'What You May Need to Know About Overriding Annotations in JPA'  at )
Also you can refer the sessions.xml in the EntityManagerFactory directly.
// "db-sess" == session name defined in the sessions.xml file 
// classpath of sessions.xml : META-INF
emf = JpaHelper.createEntityManagerFactory("db-sess");
May this will help,
Robert Lalyko

Back to the top