sailorhero a écrit:

I think I find a bug.
I used the torque 3.0.2.
when I used the second method ,but the result of query is wrong.
I open the log4j in debug mode.
I find the SQL query is wrong .
code:
Criteria crit2 = new Criteria();
crit2.add("BOOK.TITLE", (Object)"TCP", Criteria.LIKE);
List results = BookPeer.doSelect(crit2);
printBooklist(results);
The log4j is like this.
DEBUG [main] util.BasePeer (createQueryString:994) - SELECT book.BOOK_ID, book.TITLE, book.ISBN, book.TIME, book.PUBLISHER_ID, book.AUTHOR_ID FROM book, BOOK WHERE BOOK.TITLE = 'TCP'
DEBUG [main] util.BasePeer (executeQuery:1532) - Elapsed time=0 ms


Is this really a bug?
My understanding is that, if you use like, you should also give a real searching criteria and not a constant string. For me this is an optimization.
Try using "TCP%" instead.


Frederic


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to