Hello, all.
I’ve run into an issue with a Coldfusion app that I’ve been forced to maintain. I created a StackOverflow question here: http://stackoverflow.com/q/20023824/677526
Basically, I’m attempting to filter a query by a child collection; I’ve tried to do this using SubCriteria, but I’m running into issues where Coldfusion isn’t finding the correct method (giving me errors saying “method not found”). This is happening specifically for the .in() method defined by the Coldbox ORM docs.
Has anyone run into this issue before? It’s holding me back and I’m not sure how to work around it.
This is the code block I’m working with. Please let me know if I should post the full file.
if (NOT showEventsWithoutQuantifications){
EventCriteria.isNotEmpty('quantifications');
var eventStatus = eventStatusService.findWhere(entityName="EventStatus", criteria={eventStatusOrder=javaCast( "int", 150 )}); //approved
// According to the Coldbox documentation, this should have worked. It doesn't.
// var QuantificationService = quantificationService.newCriteria()
// .isEq("Quantification.status", eventStatus)
// .withProjections(property="event.eventID");
// EventCriteria.in("eventID", QuantificationService); // .in() method not found. Why?
// EventCriteria.add(EventCriteria.restrictions.in("eventID", QuantificationService)); // .in() method not found. Why?
EventCriteria.add(wmtEventCriteria.createSubcriteria('Quantifications').isEq("status", eventStatus)); // .createSubcriteria method () method not found. Why?
}