I've come off a large project using hibernate and here are 3 weakness I think hibernate has
1. Poor object inheritance handling and an aversion for instrumentation
When you load an object in hibernate (and you've used load so it is a proxy), if that object is in reality (as specified by the database) a sub-class of the one you loaded, hibernate will not load the real type of the object. You will get it a proxy on the type you asked for when you loaded (and not a proxy on the actual type of the object). so
A a = (A)session.load("id", A.class);
Even if on the database that id is of type B (a subclass of A) you will still only get a proxy onto A (and not B). In order to get the real type you have to do another step.
This same thing occurs when trawling an object tree.
Fortunately though, by using instrumentation the trawling issue is solved in that if once an object is instrumented then when trawling the object tree you will get back the real types (except when the object is pulled from a many-to-many collection though).
Instrumentation does not solve the load anomaly still exists, instrumentation could be used to solve this problem as well.
2. Save a large new object model in one go
We had several processes which generated a large amount of new entity objects (persistent objets) and I then needed to save all these. I could not simply call save on the source object and expect everything to be saved. You might ask why I didn't setup the cascading to do this, yes, I could setup the cascading for one of the use cases but then when I ran another one of the process that created new objects that would need its own cascade structure. So I would like hibernate to have a facility where I can arbitrarily save a set of objects. The work around for this is that I reflectively trawled the object tree calling save on each object, and I had to do this in a particular order. The facility I'm looking for here is called persistence-by-reachability.
3. Specify the boundaries of what I want prefetched on a task by task basis
I know with hibernate you can prefetch a collection via a keyword in a query, often that is not sufficient. Say you want to work with a bunch of related obects, you'd want to have them all pre-fetched up front so no slow down and inefficiency later, furthermore, there may be multiple sets of objects for the various tasks you're looking to perform, all with their own "fetch profile". iow, for this task I want these objects pre-fetched, for that task I want those.
Fortunately, number 3 is slated for release in hibernate 3.5 and is known as "fetch profiles".