Is there a way to find out if an entity that I am trying to delete, has any related entities, without having to handle the exception that is thrown when it does?
For example let's say I have a the following:
A PatientDiagnosisEntity
A PatientHospitalizationEntity
The PatientHospitalizationEntity has a list of PatientDiagnosisEntity(s).
Now if I try to delete a PatientDiagnosisEntity which has been assigned to a PatientHospitalizationEntity, I would like to know this before I attempt a delete instead of having to wait for an exception to be thrown.
Note: I have not preloaded any of the related entities to do simple count checks.
Thanks,
Billy Jacobs