I have two entites Parent and Child with OneToMany relationship in Hibernate, Parent has many Childs, I want to check if the Parent has Childs or not
I used these conditions and they not working
if (parent.getChilds().size() == 0)
and
if (parent.getChilds.isEmpty())