SnapshotDetailsVO doesn't have a display field even though it is required in
the searchbuilder in ResourceDetailsDaoBase
java.lang.AssertionError: Searching for a field that's not there: display
at com.cloud.utils.db.SearchBase.set(SearchBase.java:219)
at com.cloud.utils.db.SearchBase$Interceptor.intercept(SearchBase.java:475)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/adf6026d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/adf6026d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/adf6026d
Branch: refs/heads/rbac
Commit: adf6026d2117f42ea625a1d3748493fededcff40
Parents: 8a9d979
Author: Hugo Trippaers <[email protected]>
Authored: Wed Feb 5 17:44:39 2014 +0100
Committer: Hugo Trippaers <[email protected]>
Committed: Wed Feb 5 17:46:33 2014 +0100
----------------------------------------------------------------------
.../cloudstack/resourcedetail/ResourceDetailsDaoBase.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/adf6026d/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
----------------------------------------------------------------------
diff --git
a/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
b/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
index 2d08644..60d7f16 100644
---
a/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
+++
b/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
@@ -34,7 +34,10 @@ public abstract class ResourceDetailsDaoBase<R extends
ResourceDetail> extends G
AllFieldsSearch = createSearchBuilder();
AllFieldsSearch.and("resourceId",
AllFieldsSearch.entity().getResourceId(), SearchCriteria.Op.EQ);
AllFieldsSearch.and("name", AllFieldsSearch.entity().getName(),
SearchCriteria.Op.EQ);
- AllFieldsSearch.and("display", AllFieldsSearch.entity().isDisplay(),
SearchCriteria.Op.EQ);
+ // FIXME SnapshotDetailsVO doesn't have a display field
+ if (_allAttributes.containsKey("display")) {
+ AllFieldsSearch.and("display",
AllFieldsSearch.entity().isDisplay(), SearchCriteria.Op.EQ);
+ }
AllFieldsSearch.done();
}