I have the next query :
String queryString = "from Visit vis "
+ "LEFT OUTER JOIN FETCH vis.pdv vis_pdv ";
return query.list();
After that, I get the next error when I try to access to some pdv:
nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists
The point is I have some corrupt data, so "Visit" has sometimes an id in "pdv" but it doesn't exist that pdv in the table "PDV". I would like to handle this in the query, so it doesn't return corrupt data. Is there any way?
Thanks