made querybuilder accessable from resource

I have a case here where i need to add a join to another table and need access to the actuall querybuilder from the resource so this change should have very little to no impact but make it possible to modify the querybuilder.