bug 7911: in mysql, condition field != value doesn't return entries whose field is null

status 7911: resolved fixed
This commit is contained in:
anthony 2011-01-13 14:06:22 -08:00
parent 488dd424aa
commit 83b55b7040
2 changed files with 4 additions and 2 deletions

View File

@ -231,7 +231,9 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
TmpltsInZoneSearch = createSearchBuilder();
TmpltsInZoneSearch.and("removed", TmpltsInZoneSearch.entity().getRemoved(), SearchCriteria.Op.NULL);
TmpltsInZoneSearch.and("avoidtype", TmpltsInZoneSearch.entity().getTemplateType(), SearchCriteria.Op.NEQ);
TmpltsInZoneSearch.and().op("avoidtype", TmpltsInZoneSearch.entity().getTemplateType(), SearchCriteria.Op.NEQ);
TmpltsInZoneSearch.or("templateType", TmpltsInZoneSearch.entity().getTemplateType(), SearchCriteria.Op.NULL);
TmpltsInZoneSearch.cp();
TmpltsInZoneSearch.join("tmpltzone", tmpltZoneSearch, tmpltZoneSearch.entity().getTemplateId(), TmpltsInZoneSearch.entity().getId(), JoinBuilder.JoinType.INNER);
tmpltZoneSearch.done();
TmpltsInZoneSearch.done();

View File

@ -1571,7 +1571,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
isPublic,
featured,
isExtractable,
null,
TemplateType.USER,
null,
null,
requiresHvmValue,