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 "McCaffrey, John G." <Jo...@kraft.com> on 2003/05/21 18:23:04 UTC

Writing search queries

How are most of you building your methods for searching? (like from a search
page, with like searches and date ranges an dstuff) Do you add lots of SQL
like statements with query.addEqualTo(), or do you use QueryByIdentity, or
QueryByCriteria? Is there a way to do these queries without referencing the
column names in the code?

If you have a Parent object Order, that has a collection of OrderItems, How
do you write a query to return all Orders where OrderItem.type=="Fruit"?

I know this is a basic question, I was just wondering what most people were
doing out in the field.
(I can see at least one way of doing it, but I thought that you wanted to
try and avoid actually using the column names in the java code.)

Thanks for your help
-John