Role data access/Personal lock sql where incorrect
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3030369
This commit is contained in:
parent
ad6b975ca1
commit
a882c566d1
|
@ -2023,10 +2023,14 @@ public final class MRole extends X_AD_Role
|
|||
}
|
||||
where.append(")");
|
||||
}
|
||||
else if (excludes.size() == 1)
|
||||
where.append(whereColumnName).append("<>").append(excludes.get(0));
|
||||
else if (excludes.size() == 1)
|
||||
{
|
||||
where.append("(" + whereColumnName + " IS NULL OR ");
|
||||
where.append(whereColumnName).append("<>").append(excludes.get(0)).append(")");
|
||||
}
|
||||
else if (excludes.size() > 1)
|
||||
{
|
||||
{
|
||||
where.append("(" + whereColumnName + " IS NULL OR ");
|
||||
where.append(whereColumnName).append(" NOT IN (");
|
||||
for (int ii = 0; ii < excludes.size(); ii++)
|
||||
{
|
||||
|
@ -2034,7 +2038,7 @@ public final class MRole extends X_AD_Role
|
|||
where.append(",");
|
||||
where.append(excludes.get(ii));
|
||||
}
|
||||
where.append(")");
|
||||
where.append("))");
|
||||
}
|
||||
log.finest(where.toString());
|
||||
return where.toString();
|
||||
|
@ -2324,8 +2328,9 @@ public final class MRole extends X_AD_Role
|
|||
if (lockedIDs != null)
|
||||
{
|
||||
if (sb.length() > 0)
|
||||
sb.append(" AND ");
|
||||
sb.append(keyColumnName).append(lockedIDs);
|
||||
sb.append(" AND ");
|
||||
sb.append(" (" + keyColumnName + " IS NULL OR ");
|
||||
sb.append(keyColumnName).append(lockedIDs).append(") ");
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue