During the weekend I implemented basic support for Hibernate3 in spring. This task was very simple, as HB3 is highly compatible with 2.0 (with some exceptions). Doing this i've found few interesting things:
* Hibernate Exceptions are unchecked now,
* Hibernate team changed signature of few exceptions methods from Class getPersistentClass() to String getPersistentClass. Unfortunatelly it affects exceptions in org.spring.framework.orm package (Currently i decided pass nulls instead of Classes - I must investigate why they changed this and what exactly they pass in returned value - I wonder if it has something in common with named-entities),
* There are deprecated methods in Session (moved to org.hibernate.classic.Session) like int delete(...), seveOrUpdateCopy(...) - so I removed them from HibernateTemplate,
* UserType was moved to org.hibernate.usertype.UserType,
* UserType got two new methods: assemble and disassemble (like CompositeUserType) for better control over caching (affects spring Clob/Blob user types),
Refectoring current spring code was quite simple tasks, but there are few
minor problems. I just copied all orm.hibernate.* classes into new package orm.hibernate3. I didn't decide to add "3" suffix to hibernate classes, because I didn't find elegant way to add this suffix to classes like ClobStringType etc. Currently I didn't implement all new Session's methods (I will do this today). I didn't refactored test suite yet, but I unit test the code with all my applications and all tests passed.
I don't know how to attach files in the forum, so if somebody is interested in - please contact me at firstname.lastname@example.org
ps. I wonder why there is no support for Critera, Query and SQLQuery in original HibernateTemplate. Ofcourse You can always get original Hibernate session and create Queries, but You have to get (proper) current session etc. It would be nice to have convinient methods for this in HibernateTemplate, wouldn't be?