Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Usage of QueryHint INHERITANCE_OUTER_JOIN (Usgae ofQueryHint INHERITANCE_OUTER_JOIN not effective if FIRST_RESULT and MAX_ROWS are set in Query)
Usage of QueryHint INHERITANCE_OUTER_JOIN [message #1756371] Thu, 16 March 2017 05:20
Rajeswari Kolluri is currently offline Rajeswari KolluriFriend
Messages: 2
Registered: March 2017
Junior Member
We are using Eclipse Link 2.5.2 .

We had set the QueryHint INHERITANCE_OUTER_JOIN to FALSE , Query also includes FIRST_RESULT and MAX_RESULTS.

We expected the resultant Query to be simple without any Left Join of Subclasses of BusinessInteractionItem , but the final query includes all the Subclasses of BusinessInteractionItem .


If we remove the FIRST_RESULT and MAX_RESULTS in the Query , then the final Query is as expected . In this case we noticed that we have 2 queries, first one without ORDERBY and other with ORDERBY

=================================
[EL Fine]: 2017-03-16 10:26:09.235--Thread(Thread[[ACTIVE] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--JPQL> SELECT o FROM BusinessInteractionItem o WHERE o.businessInteraction = :bi AND o.action <> :action1 AND o.visibilityLevel = :visibilityLevel AND Type(o) = BusinessInteractionItem ORDER BY o.entityId DESC
[EL Fine]: sql: 2017-03-16 10:26:09.256--ServerSession(1914143920)--Connection(1508502849)--Thread(Thread[[ACTIVE] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT DISTINCT ENTITYCLASS FROM BusinessInteractionItem WHERE ((((BUSINESSINTERACTION = ?) AND (ACTION <> ?)) AND (VISIBILITYLEVEL = ?)) AND (ENTITYCLASS = ?))
bind => [3, ASSOC_TO_ACTIVITY, SHOW, BusinessInteractionItemDAO]
[EL Fine]: sql: 2017-03-16 10:26:09.284--ServerSession(1914143920)--Connection(891844147)--Thread(Thread[[ACTIVE] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ENTITYID, ENTITYCLASS, ACTION, CREATEDDATE, CREATEDUSER, ENTITYVERSION, LASTMODIFIEDDATE, LASTMODIFIEDUSER, PARTICIPATINGENTITYID, PARTICIPATINGENTITYNAME, PARTICIPATINGENTITYSPECNAME, STATUS, TOENTITYCLASS, TOENTITYREF, VISIBILITYLEVEL, BUSINESSINTERACTION FROM BusinessInteractionItem WHERE (((((BUSINESSINTERACTION = ?) AND (ACTION <> ?)) AND (VISIBILITYLEVEL = ?)) AND (ENTITYCLASS = ?)) AND (ENTITYCLASS = ?)) ORDER BY ENTITYID DESC
bind => [3, ASSOC_TO_ACTIVITY, SHOW, BusinessInteractionItemDAO, BusinessInteractionItemDAO]


=================================


QUERY Generated WITH FIRST_RESULT and MAX_RESULTS and INHERITANCE_OUTER_JOIN to FALSE

=============================
SELECT * FROM (SELECT /*+ FIRST_ROWS(200) */ a.*, ROWNUM rnum FROM (SELECT t0.ENTITYID AS a1, t0.ENTITYCLASS AS a2, t0.ACTION AS a3, t0.CREATEDDATE AS a4, t0.CREATEDUSER AS a5, t0.ENTITYVERSION AS a6, t0.LASTMODIFIEDDATE AS a7, t0.LASTMODIFIEDUSER AS a8, t0.PARTICIPATINGENTITYID AS a9, t0.PARTICIPATINGENTITYNAME AS a10, t0.PARTICIPATINGENTITYSPECNAME AS a11, t0.STATUS AS a12, t0.TOENTITYCLASS AS a13, t0.TOENTITYREF AS a14, t0.VISIBILITYLEVEL AS a15, t0.BUSINESSINTERACTION AS a16, t1.ENTITYID AS a17, t1.ADEVICEDISPLAY AS a18, t1.AINTERFACEIPADDRESS AS a19, t1.ALOCATIONDISPLAY AS a20, t1.ATERMINATIONDISPLAY AS a21, t1.CONFIGACTION AS a22, t1.CONFIGITEMID AS a23, t1.CONFIGTYPE AS a24, t1.DESIGNSEGMENTDISPLAY AS a25, t1.LABEL AS a26, t1.NAME AS a27, t1.NETWORKDISPLAY AS a28, t1.VALUE AS a29, t1.ZDEVICEDISPLAY AS a30, t1.ZINTERFACEIPADDRESS AS a31, t1.ZLOCATIONDISPLAY AS a32, t1.ZTERMINATIONDISPLAY AS a33, t1.CONFIGURATION AS a34, t1.PARENTCONFIGITEM AS a35, t1.ADEVICEINTERFACE AS a36, t1.AGEOGRAPHICLOCATION AS a37, t1.ALOGICALDEVICE AS a38, t1.ANETWORKENTITYCODE AS a39, t1.CONFIGSPEC AS a40, t1.DEPCHILDCONFIGITEM AS a41, t1.DESIGNSEGMENTPIPE AS a42, t1.NETWORK AS a43, t1.ZDEVICEINTERFACE AS a44, t1.ZGEOGRAPHICLOCATION AS a45, t1.ZLOGICALDEVICE AS a46, t1.ZNETWORKENTITYCODE AS a47, t2.ENTITYID AS a48, t2.CONFIGACTION AS a49, t2.CONFIGITEMID AS a50, t2.CONFIGTYPE AS a51, t2.LABEL AS a52, t2.NAME AS a53, t2.VALUE AS a54, t2.CONFIGURATION AS a55, t2.PARENTCONFIGITEM AS a56, t2.CONFIGSPEC AS a57, t2.DEPCHILDCONFIGITEM AS a58, t3.ENTITYID AS a59, t3.CONFIGACTION AS a60, t3.CONFIGITEMID AS a61, t3.CONFIGTYPE AS a62, t3.LABEL AS a63, t3.NAME AS a64, t3.VALUE AS a65, t3.CONFIGURATION AS a66, t3.PARENTCONFIGITEM AS a67, t3.CONFIGSPEC AS a68, t3.DEPCHILDCONFIGITEM AS a69, t4.ENTITYID AS a70, t4.CONFIGACTION AS a71, t4.CONFIGITEMID AS a72, t4.CONFIGTYPE AS a73, t4.LABEL AS a74, t4.NAME AS a75, t4.VALUE AS a76, t4.CONFIGURATION AS a77, t4.PARENTCONFIGITEM AS a78, t4.CONFIGSPEC AS a79, t4.DEPCHILDCONFIGITEM AS a80, t5.ENTITYID AS a81, t5.CONFIGACTION AS a82, t5.CONFIGITEMID AS a83, t5.CONFIGTYPE AS a84, t5.LABEL AS a85, t5.NAME AS a86, t5.VALUE AS a87, t5.CONFIGURATION AS a88, t5.PARENTCONFIGITEM AS a89, t5.CONFIGSPEC AS a90, t5.DEPCHILDCONFIGITEM AS a91, t6.ENTITYID AS a92, t6.CONFIGACTION AS a93, t6.CONFIGITEMID AS a94, t6.CONFIGTYPE AS a95, t6.LABEL AS a96, t6.NAME AS a97, t6.VALUE AS a98, t6.CONFIGURATION AS a99, t6.PARENTCONFIGITEM AS a100, t6.CONFIGSPEC AS a101, t6.DEPCHILDCONFIGITEM AS a102, t7.ENTITYID AS a103, t7.CONFIGACTION AS a104, t7.CONFIGITEMID AS a105, t7.CONFIGTYPE AS a106, t7.LABEL AS a107, t7.NAME AS a108, t7.VALUE AS a109, t7.CONFIGURATION AS a110, t7.PARENTCONFIGITEM AS a111, t7.CONFIGSPEC AS a112, t7.DEPCHILDCONFIGITEM AS a113 FROM BusinessInteractionItem t0 LEFT OUTER JOIN PIPEConfigurationItem t1 ON (t1.ENTITYID = t0.ENTITYID) LEFT OUTER JOIN ServiceConfigurationItem t2 ON (t2.ENTITYID = t0.ENTITYID) LEFT OUTER JOIN DIConfigurationItem t3 ON (t3.ENTITYID = t0.ENTITYID) LEFT OUTER JOIN PlaceConfigurationItem t4 ON (t4.ENTITYID = t0.ENTITYID) LEFT OUTER JOIN NETConfigurationItem t5 ON (t5.ENTITYID = t0.ENTITYID) LEFT OUTER JOIN LDACCOUNTConfigurationItem t6 ON (t6.ENTITYID = t0.ENTITYID) LEFT OUTER JOIN LDConfigurationItem t7 ON (t7.ENTITYID = t0.ENTITYID) WHERE ((((t0.BUSINESSINTERACTION = ?) AND (t0.ACTION <> ?)) AND (t0.VISIBILITYLEVEL = ?)) AND (t0.ENTITYCLASS = ?)) ORDER BY t0.ENTITYID DESC) a WHERE ROWNUM <= ?) WHERE rnum > ?

=======================---
Previous Topic:Unrecognized query hint [eclipselink.fetch-group.name]
Next Topic:QueryHint INHERITANCE_OUTER_JOIN
Goto Forum:
  


Current Time: Tue Dec 12 15:52:58 GMT 2017

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

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