Beginner |
|
Joined: Fri Nov 28, 2003 11:21 am Posts: 49 Location: Buenos Aires, Argentina
|
Hello im making a complex query(at least for me),and the results are not what i'm expecting.
The thing is very simple ,date before and date after,when the date after is null ,i have to verified that the parameter is bigger than date before else check that the parameter is smaller than date after.
The query is the following.
losSuplementos = BossDB.find("from Suplemento as suple " +
"where (suple.vigencia.fechaHasta is null and suple.vigencia.fechaDesde > '" + fecha.toString() + "') or suple.vigencia.fechaHasta < '" + fecha.toString() + "'" +
" and suple.producto.idElementoEditorial =" + idProducto + " and suple.habilitado =" + 1 +
" and suple.bajaLogica =" + 0 +
" order by suple.orden");
----
Using hibernate2.11
mssqlserver 2000
There are no exceptions.
|
|