entity: fixed undefined index in create() method
repository: createQuery() must be protected