]
Steve Ebersole closed HHH-970.
------------------------------
Closing stale resolved issues
Error reporting should be improved and suggestion for "lax error
checking" with no exceptions thrown
----------------------------------------------------------------------------------------------------
Key: HHH-970
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-970
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.1 beta 2
Environment: all
Reporter: Andy Bailey
I use hibernate in all my web applications and have had good experiences and bad
experiences,
when its good its very good (like you dont even know you are using a database) and when
its bad there is no information
In many cases there is not enough information to go on all you know is that somewhere in
the application
"Illegal attempt to associate a collection with two open sessions"
"deleted object would be resaved by cascade"
"object associated with two sessions"
I think all the error reporting should say what the object is what class it is what is
the primary key,
if it is a collection the first few objects , primary key and class.
Or I suspect more controversial would be that hibernate could have a "lax mode"
and a "strict mode", that in lax mode these problems get logged as errors but no
error gets thrown, assume that the user knows what they are doing.
It has happened to me that what should have been a unique result was not as the user had
entered in wrong data
the result was that using uniqueResult() caused the whole web application to effectively
hang, not pleasant!
I have seen the number of post to the users forum about these topics and think that a way
to reduce them and make hibernate easier to use is to improve the error reports.
I see in 2.1.2 there was a fix: better exception report if deleted object is resaved by
cascade
I havent checked it out as I havent fallen into that trap again! but it caused a delay of
several days as I hadnt a clue as to which object.
You could say that unit tests could narrow it down but its always possible for an error
to only show up in integration tests
like synchronisation issues.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: