[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] NamedNativeQuery using in
|
I have a
NamedNativeQuery that is using the "in" SQL statement -
@NamedNativeQuery
(name = "findCpSecuredFeatureListRole",
query = "select distinct
s.FEATURE_ID, FEATURE_NAME, FEATURE_DESC, FEATURE_TYPE, LICENSE_CHECK,
PRIVILEGE_LEVEL "
+ "from
cp_secured s, cp_role_secured rs where s.feature_id = rs.feature_id and rs.role_code in (?)
", resultClass = com.gmrc.jpa.domain.CpSecuredFeature.class
)
in my code I call -
final
Query query =
this.em.createNamedQuery("findCpSecuredFeatureListRole");
query.setParameter(1, roles);
return
query.getResultList();
where
roles is a string representing - 'GA', 'PA', 'GRN'
If I
execute this outside of Eclipselink it seems to run fine. But when it runs
in EclipseLink I get nothing returned in my results. I tried changing this
to a List<String> with each as a seperate entity in the List but that gave
me a Data Type mismatch.
Thanks,
Kevin
This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.
Thank you.