Skip to main content


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 10:44 Go to next message
Enrico is currently offline EnricoFriend
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 15:05 Go to previous message
James Sutherland is currently offline James SutherlandFriend
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: Thu Apr 25 01:36:57 GMT 2024

Powered by FUDForum. Page generated in 0.02841 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top