Allowing for more flexible dump_object queries

for example using relationships as part of the where clause.