How to check if my table has related records?

Asked

Viewed 32 times

0

I am developing a project using JPA and with various relationship types like Onetomany, Manytomany, etc. Is there any way I can check if an X table for example has related records in another Y table ?

I can use Reflection but do not see this solution as ideal, inclusive li que pode diminuir a performance da aplicação.

What do you think ?

Thank you for your attention.

  • What is the purpose of you checking ?

  • Hi Douglas, the purpose would be to show the option to delete to the user only if that record has no corresponding key in another table, ie no relationships. Got it ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.