Reputation: 17773
I'm using an entity that has properties computed by view. In my sample scenario:
So NHibernate if forced to have three trips to database.
What I'm trying to achieve is to have only two trips:
Is it possible?
Upvotes: 1
Views: 1091
Reputation: 49251
No, it's not possible. You have to issue three SQL commands: select, update, select. NHibernate does support batching but it batches together inserts or updates, not mixed commands.
Aditionally, NHibernate supports Generated Properties, so you don't have to update those columns by hand (it still requires a roundtrip, but it's transparent)
Upvotes: 4