1. DML-style operations (insert) forum.hibernate.orgHi. I need execute the following query: String hqlInsert = "insert into PermisoGrupo (grupo,pagina,elemento,propiedad,permiso ) SELECT g,e,p,p.valor FROM Propiedad p,Elemento e where e.idElemento=p.elemento.idElemento and e.estado='new' and e.pagina.idPagina="+p.getIdPagina(); int createdEntities = session.createQuery( hqlInsert ) .setParameter("g",g) .executeUpdate(); grupo, pagina,elemento and propiedad are classes. I'm try execute this query of diferent forms, but I don't know how. |
2. DML-style operations (insert) forum.hibernate.orgHi. I need execute the following query: String hqlInsert = "insert into PermisoGrupo (grupo,pagina,elemento,propiedad,permiso ) SELECT g,e,p,p.valor FROM Propiedad p,Elemento e where e.idElemento=p.elemento.idElemento and e.estado='new' and e.pagina.idPagina="+p.getIdPagina(); int createdEntities = session.createQuery( hqlInsert ) .setParameter("g",g) .executeUpdate(); grupo, pagina,elemento and propiedad are classes. I'm try execute this query of diferent forms, but I don't know how. |