0
このJDOQLは次のSQLと同じですか?どのようにJDOQLでSQL INクエリを達成するには?
Query query = pm.newQuery(Vote.class, ":p.contains(personId)");
if (startDate != null) {
query.setFilter("personId == listOfIds && createdDate > startDateParam");
query.declareParameters("java.util.List listOfIds, java.util.Date startDateParam");
}
else {
query.setFilter("personId == :listOfIds");
}
query.setOrdering("createdDate desc");
List<Vote> list = (List<Vote>) query.execute(listOfIds, startDate);
SELECT * FROM VOTE
WHERE persionID IN (id1, id2..)
AND createdDate > '2011-07-11'
ORDER BY createdDate desc;