CLOUDSTACK-8805: Domains become inactive automatically.

Handled the '%' case by replacing that with a literal character rather than a wildcard character.
This commit is contained in:
Nitin Kumar Maharana 2016-12-09 12:51:41 +05:30
parent ee83b02c76
commit 397a7328ab
1 changed files with 1 additions and 1 deletions

View File

@ -373,7 +373,7 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
List<DomainVO> domains = _domainDao.search(sc, null);
SearchCriteria<DomainVO> sc1 = _domainDao.createSearchCriteria();
sc1.addAnd("path", SearchCriteria.Op.LIKE, "%" + domainHandle.getPath() + "%");
sc1.addAnd("path", SearchCriteria.Op.LIKE, "%" + "replace(" + domainHandle.getPath() + ", '%', '[%]')" + "%");
List<DomainVO> domainsToBeInactivated = _domainDao.search(sc1, null);
// update all subdomains to inactive so no accounts/users can be created