refactored Resource.where
allow to only hydrate some predicates when doing a where