openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From me_satya <hello_satyen...@yahoo.co.in>
Subject Re: [JPQL] Problem statement SELECT ... IN () , with parameters
Date Tue, 27 Oct 2009 08:40:13 GMT

String queryString = new String("SELECT ci FROM Cxyz ci WHERE ci.Idxyz IN
(:UIDs) AND ci.dxyz IS NULL");
		Query query = em.createQuery(queryString);
ci.Idxyz is the column of byte type.
this :UIDs is the list of object.
Can any one let me know how can i set this list in the query

I tried the following but got some unsupported operation exception.

    	List<byte[]> IdList = Arrays.asList(new byte[]{});
    	for (UID<ContextContainerId> containerId : containerUIDs) {
    	    UIdList.add(containerId.toBytes());
    	}
    	query.setParameter("UIDs", UIdList);

I will appriciate you people help me out here!!!
-- 
View this message in context: http://n2.nabble.com/JPQL-Problem-statement-SELECT-IN-with-parameters-tp686295p3897633.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message