Hi,
I'm costructing an Expression for creating a SelectQuery:
final Expression template = Expression.fromString(
("db:dt_start=$data or db:dt_fine=$data "+
"and db:titolo_ita like $titolo and "+
"(db:titolo_ita like $chiave "+
"or db:titolo_eng like $chiave "+
"or db:abs_ita like $chiave "+
"or db:abs_eng like $chiave "+
")").toLowerCase()
);
I'm expeting that when there are no parameters I can retreave all the
rows in the table.
Unfortunatly this isn't the case: I alway retrieve 0 rows.
Here is the line executed (from the logger):
INFO [http-8090-Processor4 03-30 08:32:42] QueryLogger: SELECT
t0.abs_eng, t0.abs_ita, t0.codfis, t0.descr_eng, t0.descr_ita,
t0.dt_fine, t0.dt_ins, t0.dt_start, t0.in_home, t0.mostra_data,
t0.pubblica, t0.tipo, t0.titolo_eng, t0.titolo_ita, t0.id_news FROM
db.news t0 WHERE (t0.dt_start = (?)) OR ((t0.dt_fine = (?)) AND
(t0.titolo_ita LIKE (?)) AND ((t0.titolo_ita LIKE (?)) OR (t0.titolo_eng
LIKE (?)) OR (t0.abs_ita LIKE (?)) OR (t0.abs_eng LIKE (?)))) [bind: '',
'', '', '', '', '', ''] - prepared in 20 ms.
INFO [http-8090-Processor4 03-30 08:32:43] QueryLogger: === returned 0
rows. - took 40 ms.
Where is my mistake? Thank a lot!
-- Ivan
This archive was generated by hypermail 2.0.0 : Thu Mar 30 2006 - 02:40:16 EST