posted 17 years ago
For the first question, Hibernate does those validations before even going to the database. Hence if you have something wrong, like a not-null value set, Hibernate can report it back before doing a database hit. Not sure why they didn't check in delete, that if it has an ID let it not go through that validation, but I think they might have made the whole thing generic where it doesn't look at what you are performing, just always validating.
You might need to retrieve the object first, like through load, get a proxy object, no hit to the database, then call delete using the proxy object.
Mark