mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-8908: After copying the template charging for that template is stopped (#2308)
When a template is copied back to zone after it is deleted. deleted field gets reset to null. delete field is added to Search on template zone mapping table to take care of the existing mapping.
This commit is contained in:
parent
47419df368
commit
566238b08e
@ -66,6 +66,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
|
||||
IdZoneSearch.and("id", IdZoneSearch.entity().getId(), SearchCriteria.Op.EQ);
|
||||
IdZoneSearch.and("type", IdZoneSearch.entity().getStorageType(), SearchCriteria.Op.EQ);
|
||||
IdZoneSearch.and("dcId", IdZoneSearch.entity().getZoneId(), SearchCriteria.Op.EQ);
|
||||
IdZoneSearch.and("deleted", IdZoneSearch.entity().getDeleted(), SearchCriteria.Op.NULL);
|
||||
IdZoneSearch.done();
|
||||
}
|
||||
|
||||
@ -85,6 +86,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
|
||||
sc.setParameters("id", id);
|
||||
sc.setParameters("type", type);
|
||||
sc.setParameters("dcId", dcId);
|
||||
sc.setParameters("deleted", null);
|
||||
return listBy(sc, null);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user