Hi Thamba,
The submissionQueryFilter string is essentially a standard SQL WHERE claus.
For example:
def dao = DaoFactory.getSubmissionDao() dao.getAllSubmissionsByFilter("trackingNumber = 'ABC123'", null, null);
returns the submission that has a tracking number/code of ABC123.
I wouldn't recommend using this method, due to the need for in-depth knowledge of the database columns.
Regards,
Jye
Thanks Jye.
I will stick with getSubmissionList then
In the SubmissionDao class there is a method named getAllSubmissionsByFilter(String submissionQueryFilter, String dateField, Date cutoffDate)
How do you use this method?
What can you put in the submissionQueryFilter?
What is the dateField?
What is the cutoffDate?
I tried DaoFactory.getSubmissionDao().getAllSubmissionsByFilter("form.formCode == 'xxx'", null, null), but I get the following exception
org.apache.cayenne.CayenneRuntimeException: [v.3.1 Sep 20 2014 14:06:21] Error performing query. at org.apache.cayenne.access.IncrementalFaultList.fillIn(IncrementalFaultList.java:182) at org.apache.cayenne.access.IncrementalFaultList.<init>(IncrementalFaultList.java:133) at org.apache.cayenne.access.SimpleIdIncrementalFaultList.<init>(SimpleIdIncrementalFaultList.java:42) at org.apache.cayenne.access.DataContextQueryAction.interceptPaginatedQuery(DataContextQueryAction.java:114) at org.apache.cayenne.util.ObjectContextQueryAction.executePostCache(ObjectContextQueryAction.java:105) at org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:93) at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:989) at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:978) at com.avoka.fc.core.dao.SubmissionDao.getAllSubmissionsByFilter(SubmissionDao.java:2222) at com.avoka.fc.core.dao.SubmissionDao$getAllSubmissionsByFilter$0.call(Unknown Source)
Thanks