Hello:
I have to retrieve from the DB ,all the products with the following criteria:
lasSecciones = GuiSGP.session.find("from Seccion where F_IdSuplemento =" + idProducto + " and A_Habilitado =" + 1 + " and A_BajaLogica =" + 0);
Since the relation is bidirectional ,using:
ListaSuplementos losSuplementos =new ListaSuplementos(unProducto.getSuplementos()) ;
Retrieves all the elements ,does exist a way to retrieve the elements with a criteria like habilitado = true ,using the setters and getter of a class.
Like Criteria Queries (chapter 14 ,reference).
Thanks.
|