users@glassfish.java.net

Re: Reflection for JPA entity metadata

From: <glassfish_at_javadesktop.org>
Date: Mon, 12 Mar 2007 05:10:25 PST

There is nothing in JPA that specifies the meta-data model used by an Implementation. Each implementation will use their own model. In TopLink Essentials you can gain access to the meta-data through casting to the TopLink EntityManager implementation, getting the Session and then getting the Project from the session. In TopLink the Project is the root object in the meta-data tree.

((oracle.toplink.essentials.ejb.cmp3.EntityManager)em).getSession().getProject()

--Gordon
[Message sent by forum member 'gyorke' (gyorke)]

http://forums.java.net/jive/thread.jspa?messageID=207404