Skip to content

Commit

Permalink
Corrected queries
Browse files Browse the repository at this point in the history
  • Loading branch information
stevespringett committed Apr 17, 2016
1 parent 6d41cd8 commit 8ee64e7
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -364,7 +364,7 @@ public List<LibraryVersion> allLibrary() {
@SuppressWarnings("unchecked")
public List<Library> uniqueLibrary() {
final Query query = getSession().
createQuery("select distinct lib from Library as lib order by libraryname");
createQuery("select distinct l.libraryname from Library as l order by l.libraryname");
return query.list();
}

Expand All @@ -376,7 +376,7 @@ public List<Library> uniqueLibrary() {
@SuppressWarnings("unchecked")
public List<License> uniqueLicense() {
final Query query = getSession().
createQuery("select distinct lic from License as lic order by licensename");
createQuery("select distinct l.licensename from License as l order by l.licensename");
return query.list();
}

Expand All @@ -388,7 +388,7 @@ public List<License> uniqueLicense() {
@SuppressWarnings("unchecked")
public List<LibraryVendor> uniqueVendor() {
final Query query = getSession().
createQuery("select distinct lic from LibraryVendor as lic order by vendor");
createQuery("select distinct v.vendor from LibraryVendor as v order by v.vendor");
return query.list();
}

Expand Down

0 comments on commit 8ee64e7

Please sign in to comment.