Duplicidade de marca em preço em escala (fixed bug #5577)

Tempo: 1 hora

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@37212 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2014-08-12 17:32:57 +00:00
parent f2ecb4d01a
commit eb29d28b78
1 changed files with 24 additions and 17 deletions

View File

@ -41,7 +41,14 @@ public class MarcaClaseServicioHibernateDAO
}
public List<Marca> buscar(ClaseServicio clase) {
Query q = getSession().createQuery("select mc.marcaClaseservicioPK.marca from MarcaClaseServicio mc where mc.activo = 1 and mc.marcaClaseservicioPK.claseservicio.claseservicioId = " + clase.getClaseservicioId());
StringBuilder hql = new StringBuilder();
hql.append(" select mc.marcaClaseservicioPK.marca ");
hql.append(" from MarcaClaseServicio mc ");
hql.append(" where mc.activo = 1 and mc.marcaClaseservicioPK.marca.activo=1 ");
hql.append(" and mc.marcaClaseservicioPK.claseservicio.claseservicioId = " + clase.getClaseservicioId());
Query q = getSession().createQuery(hql.toString());
return q.list();
}