minor fixes before cache change
added basic querying by object, i.e. can put associated object into query hashmap for query on model and it will find the associated object