Add entity attr_accessibles and relationship to/from query