On Wed, Jan 29, 2003 at 09:12:55AM +1100, [EMAIL PROTECTED] wrote: > Why not just do > > Session.find("from o in class MyClass where o.id=?", .....) > > thats basically equivalent to Session.load(), but throws no exceptions....
Okay. > >I imagine the tricky bit is that the different JDBC drivers throw > >different types of exceptions? But perhaps the hibernate adapters could > >abstract out those differences, for the important types of errors. > > Yes, that is one problem. > > The other problem is that the Session is heavily re-entrant. So the only > way to guarantee atomicity of operations is to "back up" the state of the > Session before each invocation. I implemented this in an older version but > discovered that the performance cost was absolutely prohibitive (it was > a much larger overhead than you would expect). Alright, I'll take your word for it :-). Although it would be nice to be to be able to recover from constraint violations and the like more gracefully than one currently can, at least for operations involving a single row. Maybe something will present itself down the line. Thanks, Chris ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel