Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Schema name from orm.xml
Schema name from orm.xml [message #508295] Mon, 18 January 2010 05:44 Go to next message
Enrico is currently offline Enrico
Messages: 82
Registered: July 2009
Member
Hi all,

is there a way to get the schema name I have set in the orm.xml??

<schema>myschema</schema>

I check in EntityManager and EntityManagerFactory objects but I didn't
found the schema name string.

I need the schema name in order to set my native query properly.

BR,
Enrico
Re: Schema name from orm.xml [message #508365 is a reply to message #508295] Mon, 18 January 2010 10:05 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The schema can be obtained from the EclipseLink ClassDescriptor.

i.e.
em.unwrap(JpaEntityManager.class).getServerSession().getDesc riptor(MyClass.class).getTables().get(0).getTableQualifier()



James : Wiki : Book : Blog : Twitter
Previous Topic:Using a Factory to create entity object instances
Next Topic:Problems with auto-generated sequence
Goto Forum:
  


Current Time: Wed Aug 27 09:04:26 EDT 2014

Powered by FUDForum. Page generated in 0.01665 seconds