Robert Zeigler wrote:
SelectQuery q = new SelectQuery(Person.class);
Expression qual =
ExpressionFactory.matchExp(Person.COUNTRY_PROPERTY,country);
qual = qual.andExp(ExpressionFactory.matchExp(Person.NAME_PROPERTY,name);
q.setQualifier(qual);
dataContext().performQuery(qual);
Thanks Robert
Two comments.
First, for the query you're running, you probably want an object
select query, rather than SQLTemplate:
SelectQuery q = new SelectQuery(Person.class);
Expression qual =
ExpressionFactory.matchExp(Person.COUNTRY_PROPERTY,country);
qual =
qual.andExp(ExpressionFactory.matchExp
hello,
I am using Cayenne 2.0.4 in a standalone application with Derby embedded.
The following code breaks for obvious reasons when there is an
apostrophe ("'") in the person's name.
-
SQLTemplate template = new SQLTemplate(Person.class, "SELECT * FROM
people where country_id=" + St
Ok thanks for the tips !
Andrus Adamchik wrote:
On Feb 11, 2009, at 1:19 AM, Laurent Marchal wrote:
Yeah i agree that table/field/date/old value/new value is clearer,
but it seems complex to me to have old/new values.
Currently this can be done by listening to
org.apache.cayenne.access.eve