Quote:
when i save an entity(customer),and database rejects it due to violation of some constraint,then when i call to get list of that entitytype(customer)
you can't do that within the same session. when an exception occurs, you have to abandon the session and start over. so, if you have a situation where a save() fails, then you have to session.Close() and get a new session to do your read.
btw, I've seen (and answered) several of your questions and I have to ask, have you checked the documentation? most of this is described in the doco. also, get your hands on a copy of the Hibernate in Action (for Hibernate 2) book. it has very good details in there, too.
-devon