Commits

Anonymous committed eb722dd

Fix from USER-78

  • Participants
  • Parent commits a2a1ddf

Comments (0)

Files changed (1)

File src/java/com/opensymphony/user/provider/hibernate/dao/HibernateQueries.java

     //~ Static fields/initializers /////////////////////////////////////////////
 
     public static final String USER_BY_USERNAME = "select distinct hibuser from hibuser in class " + HibernateUser.class.getName() + " where hibuser.name = ? ";
-    public static final String USER_BY_USERNAME_AND_GROUPNAME = "select distinct hibuser from hibuser in class " + HibernateUser.class.getName() + ", hibgroup in hibuser.groups.elements where hibuser.name = ? and hibgroup.name = ?";
+    public static final String USER_BY_USERNAME_AND_GROUPNAME = "select distinct hibuser from " + HibernateUser.class.getName() + " as hibuser join hibuser.groups as hibgroup where hibuser.name = ? and hibgroup.name = ?";
     public static final String ALL_USERS = "from hibusers in class " + HibernateUser.class.getName();
     public static final String GROUP_BY_GROUPNAME = "select distinct hibgroup from hibgroup in class " + HibernateGroup.class + " where hibgroup.name = ? ";
     public static final String ALL_GROUPS = "from hibgroups in " + HibernateGroup.class;