Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » How do you select delimit-identifiers at runtime?
How do you select delimit-identifiers at runtime? [message #557547] Wed, 08 September 2010 04:36 Go to next message
Rich Mayfield is currently offline Rich MayfieldFriend
Messages: 44
Registered: August 2010
Member
In some circumstances I need to enable delimit-identifiers and others I need this disabled. I know in orm.xml you enable this by including:

<persistence-unit-metadata>
<persistence-unit-defaults>
<delimited-identifiers/>
</persistence-unit-defaults>
</persistence-unit-metadata>

What I would like to do is remove this from orm.xml and then programatically enable the functionality when I detect that it is necessary.

We do use Spring ORM 3.0.3 (with org.springframework.orm.jpa.LocalContainerEntityManagerFacto ryBean to make entity manager factory available). It is not clear to me if the solution is in EclipseLink or Spring to be honest, but after a fair amount of poking around the source nothing leaps out.

Any pointers are greatly appreciated. Thanks much.
Re: How do you select delimit-identifiers at runtime? [message #558615 is a reply to message #557547] Mon, 13 September 2010 17:08 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

There does not seem to be a convenient runtime setting for this (perhaps log a bug/enhancement), but there are some ways to do this at runtime.

You could use a Descriptor or SessionCustomizer to loop through your ClassDescriptor and set setUseDelimiters(true) on the DatabaseTable and DatabaseField (getTables(), getFields()) objects.

Or you could get the DatabasePlatform from the Session and set the start and endDelimiter to "".


James : Wiki : Book : Blog : Twitter
Previous Topic:EclipseLink 2.1 does not work together with obfuscated jar
Next Topic:NoSuchMethodError _persistence_set(Ljava/lang/String;Ljava/lang/Object;)V
Goto Forum:
  


Current Time: Fri Apr 19 04:46:14 GMT 2024

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

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

Back to the top