on-internet
← Community

Hibernate criteria.setFetchMode("") not working

Stack Overflow ·

I have a simple Criteria, like this: final Criteria players = session.createCriteria(Players.class).add(Restrictions.idEq(1)); final Criteria team = players.createCriteria("team","team").add(notDeleted()); i need a player with ID=1 and the team is not deleted this is working OK but i need the Owner of the team and the address of the owner. strangely this is not working.. team.createCriteria("owner").setFetchMode("address",FetchMode.JOIN); This is not working neither: team.createCriteria("owner").setFetchMode("owner.address",FetchMode.JOIN); here i have the owner but i dont have the address. bu

Comments

Sign in or sign up to comment and upvote.

No comments yet.