move the query on ResourceBase
Merge pull request #116 from simod/base

move the query on ResourceBase