| Left Outer Join With Curly Brackets [message #654253] |
Mon, 14 February 2011 13:56  |
Mauro Flores Messages: 83 Registered: September 2009 Location: Brasil |
Member |
|
|
We are working with a proprietary jdbc driver to access a mainframe database(dmsII).
This driver implements SQL Ansi.
We are using eclipselink without specifying a TargetDataBase. All jpql queries are translated to sql ansi format and we had no problem so far.
But, we are facing a problem with a 'Left Outer Join'. The sql command is being build in a 'weird' way:
SELECT FROM {oj KICC66D t1 LEFT OUTER JOIN KICC110D t0 ON (t0.K110_ORG_REG = t1.K66_ORG_REG)}
This driver is complaining about the curly brackets.
Three questions:
- is this format with curly brackets correct for SQL ANSI ?
- what's the best TargetDataBase in order to generate just SQL ANSI format ?
- is there a property to say to eclipselink not to use curly brackets to build a left join command?
Thanks.
|
|
|
| Re: Left Outer Join With Curly Brackets [message #654903 is a reply to message #654253] |
Thu, 17 February 2011 09:58  |
James Sutherland Messages: 1834 Registered: July 2009 |
Senior Member |
|
|
The {'oj syntax is part of the JDBC standard escape clause syntax.
You can disable it by defining your own DatabasePlatform subclass and defining the method,
shouldUseJDBCOuterJoinSyntax() {
return false;
}
Then set your platform using the "eclipselink.target-database" persistence.xml property.
If you databases syntax differs than the standard, you can refer to the source code for the other platform subclasses in, org.eclipse.persistence.platform.database.
James : Wiki : Book : Blog
|
|
|
Powered by
FUDForum. Page generated in 0.01537 seconds