[Bugfix] fixed wrong implementation of Dao.hasElement()