Yair Zaslavsky has posted comments on this change. Change subject: core: WIP: Adding JPA to ovirt ......................................................................
Patch Set 16: (1 comment) http://gerrit.ovirt.org/#/c/22806/16/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java: Line 40: Query query; Line 41: Line 42: if (isFiltered) { Line 43: query = Line 44: em.createQuery("select distinct g from VDSGroup g inner join g.userIds u where u.id.userId = :userId and g.id = :id"); > General comment to all those static select strings Eli, IMHO the intention is NOT to to have a hybrid solution. Liran just started and wanted to show his directions so we can comment. Bare in mind that it's a "known pattern" in Hibernate/JPA to use native queries when there is no resort. Line 45: query.setParameter("userId", userID); Line 46: } else { Line 47: query = em.createQuery("select distinct g from VDSGroup g where g.id = :id"); Line 48: } -- To view, visit http://gerrit.ovirt.org/22806 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cd0bbf9f0913955cb3e1facfa9a4bdc1f1ab24d Gerrit-PatchSet: 16 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liran Zelkha <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa <[email protected]> Gerrit-Reviewer: Itamar Heim <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Mike Kolesnik <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
