mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1989: Without this fix you can't query service offerings
that don't have a domain id set (null). Tested via: Called "listServiceOfferings" using a simple perl script, once with an ID, and once without an ID specified. Signed-off-by: Chip Childers <chip.childers@gmail.com>
This commit is contained in:
parent
accfccd83e
commit
38df62865d
|
|
@ -2119,7 +2119,11 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
|||
domainRecord = _domainDao.findById(domainRecord.getParent());
|
||||
domainIds.add(domainRecord.getId());
|
||||
}
|
||||
sc.addAnd("domainId", SearchCriteria.Op.IN, domainIds.toArray());
|
||||
SearchCriteria<ServiceOfferingJoinVO> spc = _srvOfferingJoinDao.createSearchCriteria();
|
||||
|
||||
spc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray());
|
||||
spc.addOr("domainId", SearchCriteria.Op.NULL);
|
||||
sc.addAnd("domainId", SearchCriteria.Op.SC, spc);
|
||||
|
||||
// include also public offering if no keyword, name and id specified
|
||||
if ( keyword == null && name == null && id == null ){
|
||||
|
|
|
|||
Loading…
Reference in New Issue