The problem is that you are not passing a restriction into the disjunction or conjunction, the and or or statements. The criteria builder object funnels via onmissingMethod to the restrictions class so we can build a nice programmatic DSL. However, the special cases are “and’ and “or”s, as they require a real restriction object to be passed not the criteria builder. Thus, just add the restrictions class prefix:
var svc=priceSvc.new();
var c=svc.newCriteria();
c.and(
c.restrictions.eq(“PRODUCT_CD”,“PRODUCT1”),
c.restrictions.eq(“CURRENCY_CD”,“USD”),
c.restrictions.isNull(“END_DT”)
).list();
Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408
ColdBox Platform: http://www.coldbox.org
ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox