You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Evan Cooney <ev...@yahoo.com> on 2005/08/04 18:02:46 UTC
Referencing table / column names in Criteria object
I am using concatenation in my criteria.addLike() method and it works fine if all the fields are
in the same table. However, if I try to concat a field from a properly mapped 1:1 relationship, I
get 'coulmn xxxxxxx not found' .
I've tried the syntax of
addLike("CONCAT( field1, field2, tableName.field1 )", "%value%")
as well as
addLike("CONCAT( field1, field2, relationshipName.field1 )", "%value%")
and neither work. However,
addLike("tableName.field1", "%value%%") works fine. Is there a better way to be doing this? I'm
using mysql 4.1 as my database.
Thanks,
Evan
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org