Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPQL : Not able to use IN clause on only the values of an element collection map

Hi Bhakti,

It looks like there is an issue with this particular usecase. Please file a bug. The only workaround I can think of is to use EclipseLink native API to build your query or native SQL.

-Tom

On 10/12/2012 1:09 AM, bhakti b wrote:
Hi Tom

Yes, I have tried the value keyword, but it still selects both key and value
combination and SQL Exception is thrown for "Too many values"

This is JPQL that I have tried :
		<named-query name="fetchAllowedPurposeCodes">
                 <query>
                 select distinct
                 a.allowedPurposeCodes from com.test.CreditPolicyTemplate
                 c JOIN FETCH c.allowedPurposeCodes a where
c.creditPolicyTemplateKey.creditPolicyTemplateId IN
                 (	select
                         value(lnk)
                         from
                         com.test.ProductGroup p JOIN
                         p.groupCreditPolicyLinkage lnk
                         where
                         p.productGroupKey.productGroupCode in
                         (:productGroup)
                         )

                 </query>
         </named-query>
		
Regards
Bhakti



--
View this message in context: http://eclipse.1072660.n5.nabble.com/JPQL-Not-able-to-use-IN-clause-on-only-the-values-of-an-element-collection-map-tp156050p156340.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top