In the Apache Cayenne documentation, they provide an example of how to create a parameterized query using the Expression class' fromString() function:
// create a qualifier with two named parameters: "pname" and "aname"
Expression qual = Expression.fromString("paintingTitle = $pname or toArtist.artistName = $aname");
// build a query prototype of a query - simply another select query
SelectQuery proto = new SelectQuery(Painting.class, qual);
The making of such a query is pretty straightforward, except for one problem: the documentation does not explain what $pname and $aname are or how to set them to the values you want to query for!
Can anyone explain how to set these parameters??? Please advise...