hiaso wrote:
My problem now is, that any changes I write to the "unflushed" session are not reachable by queries.
...
I now have to manage differences between changes written to the session and the actual state of the database on my own. Well, I always thought that such a management is one of the key features of Hibernate.
It is, but you can't query into those changes without first flushing to the database. NH only translates HQL and Criteria into DB-specific SQL, it does not also query its own internal state.
As for having to "give up" on NH, it seems that you could build your own conversation abstraction on top of using NH as your mapping and unit-of-work provider.