Quote:
commited implicitly when the sessions is closed?
of course this is not recommended and extremely dangerous!
Quote:
maybe migrating to it isn't a very good idea after all
you can do what you want ;)
hibernate is not only an object oriented query language.
hibernate is not only a persistence engine.
Be sure i'm friendly and this is a real advice: read HIA, it talks about orm in general.
You're getting nervous because of one particular use case that is problematic with mySQL, maybe the problem is elsewhere...
Is it really hard for you to
- use transaction api and call begin and commit ?
- write this use case in pure jdbc to use this very extraordinary feature that is autocommit? hum hum
just an advice, querying can be reused elsewhere in your app, so it's a best practice to isolate queries.
If so, how to know when the returned objects will be read or updated?
The transactions (db or applicative) have to be managed by the layer calling the queries.
Typically, controller calls DAO, so maybe controller have to_know_ about transaction....
Your problem is definitly a design problem.