Added entity model
Make query work in testapp