added a with clause to entity