Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Oracle ORDERED USE_NL and Eclipselink(Oracle ORDERED USE_NL and Eclipselink)
Oracle ORDERED USE_NL and Eclipselink [message #667474] Thu, 28 April 2011 23:49 Go to next message
Ahmed Al Kahky is currently offline Ahmed Al KahkyFriend
Messages: 6
Registered: July 2009
Junior Member
Hello,
I have an application that should be migrated to eclipselink, some sql statements contain a hint to oracle using ORDERED USE_NL as the data that should be retrieved is distributed across multiple tables, My question is there any way to handle that using eclipselink other than using native queries.
Re: Oracle ORDERED USE_NL and Eclipselink [message #667911 is a reply to message #667474] Mon, 02 May 2011 18:27 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

What is the SQL exactly?

EclipseLink does have a JPA Query hint to allow SQL hints,

"eclipselink.sql.hint"


James : Wiki : Book : Blog : Twitter
Re: Oracle ORDERED USE_NL and Eclipselink [message #667942 is a reply to message #667911] Mon, 02 May 2011 21:15 Go to previous messageGo to next message
Ahmed Al Kahky is currently offline Ahmed Al KahkyFriend
Messages: 6
Registered: July 2009
Junior Member
the query is:


SELECT /*+ ORDERED USE_NL(C) USE_NL(A) USE_NL(B) USE_NL(D) */
a.field1, a.field2, d.field1, b.field1, b.field3
from table3 c, table1 a, table2 b, table4 c
where a.field3 = b.field3 and a.field3 = d.field2 and a.field4=c.field1

knowing that there is no entity mapped to all these fields

[Updated on: Mon, 02 May 2011 21:45]

Report message to a moderator

Re: Oracle ORDERED USE_NL and Eclipselink [message #668644 is a reply to message #667942] Fri, 06 May 2011 14:28 Go to previous messageGo to next message
Ahmed Al Kahky is currently offline Ahmed Al KahkyFriend
Messages: 6
Registered: July 2009
Junior Member
do you have any suggestions for that issue?
Re: Oracle ORDERED USE_NL and Eclipselink [message #669211 is a reply to message #668644] Mon, 09 May 2011 13:54 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You can add the hint using,

"eclipselink.sql.hint"="/*+ ORDERED USE_NL(C) USE_NL(A) USE_NL(B) USE_NL(D) */"

But, since the SQL is pretty specific you are probably better off using a native SQL query.


James : Wiki : Book : Blog : Twitter
Previous Topic:@ElementCollection List<String> dont delete first record on merge
Next Topic:Override the propertyChange method of AttributeChangeListener Class
Goto Forum:
  


Current Time: Tue Apr 23 10:42:24 GMT 2024

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

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

Back to the top