Eli Mesika has posted comments on this change.

Change subject: core: WIP: Adding JPA to ovirt
......................................................................


Patch Set 17:

(1 comment)

http://gerrit.ovirt.org/#/c/22806/17/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");
Since this is a evolution rather than evolution , I expect that we can compare 
the sql between pre JPA and after JPA. Doing this by replacing the calls to SPs 
with plain sql text will make life hard in finding bugs. Doing that as I 
suggested with a singleton having a map of KEY,SQL where KEY is a pair of <BE, 
OriginalSPName> will ease maintenance and bug resolving while encapsulating all 
SQL in one place and also will simplify future schema changes patches
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: 17
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

Reply via email to