Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Using SQL() function in the FROM clause
Using SQL() function in the FROM clause [message #1697907] Tue, 09 June 2015 14:08
Kamil Chaber is currently offline Kamil ChaberFriend
Messages: 1
Registered: June 2015
Junior Member
Hi guys,
I want to mix the JPQL code with some SQL in the following way:
SELECT entity FROM SQL('SELECT * FROM SOME_TABLE') entity WHERE entity.property1 = 1;


Unfortunatelly I'm always getting errors like:
Quote:

The identification variable is not following the rules for a Java identifier: 'SELECT * FROM SOME_TABLE'


How can I achieve such mix? Is it possible at all?

To clarify my intention with mixing JPQL with SQL:
The nested native SQL query is some complex query using inter alia recursive functionality, with clauses which are not available in JPA even in EclipseLink JPA. On the other hand I have a lot of functionality prepared for parsing JPQL queries, such as adding additional criteria etc.. Having the jpql as a main query is very important for me.
Previous Topic:Custom Object IN Parameter
Next Topic:MOXy: Is it possible to generate xml node name based on the value of another attribute
Goto Forum:
  


Current Time: Thu Mar 28 09:14:08 GMT 2024

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

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

Back to the top