In our persistence.xml we were missing a mapping. Neither Hibernate nor JPA complained. Hibernate just didn’t return any records. As soon as we added the everything worked fine.
So my question is, is there anything we can do so that we get an error in the future if this happens again?
liquibase ‘s hibernate integration may help you. It scans mappings and gives changesets that contain information about which tables or columns are missing or needs to be updated.
So you can inspect if your mappings are missing or not.
On the other hand, I don’t think there is a library or somethin that can give you warnings in a situation like that.