When you saveOrUpdate an object, it examines it's id to see if it's unsaved or saved. If unsaved, it creates it, and returns the new id. If it is already saved, it updates the persistent form with the changes that have been introduced.
If you create a Person:
Code:
Person p = new Person();
p.setName("Example");
Serializable id = session.saveOrUpdate(p);
Then a persistent form is created for that person. If you do:
Code:
Person p = new Person();
p.setName("Example");
Serializable id = session.saveOrUpdate(p);
id = session.saveOrUpdate(p);
Then you are trying to create two people with the name "Example". However, if you do:
Code:
Person p = new Person();
p.setName("Example");
Serializable id = session.saveOrUpdate(p);
p = (Person)session.load(Person.class, id);
id = session.saveOrUpdate(p);
Then you are saving the person, loading up the person with the correct id, and trying to updated the persisted form with that person (which does nothing).
So, you do not have to check existence unless you want to avoid exceptions due to unique constraints. In the case that you do, then as you say, you will have to recurse down the children and associations. Since this is probably alot of work, it may be easier to let the db do this for you, and respond with an exception when yu try to save.