I'm looking in to using NHibernate in an already existing application, but it doesn't seem like a good fit. To make sure i'm not missing anything obvious, i would like to ask your advice.
It is a client-server application which models some complex process and and allows multiple users to simultaneously simulate different scenarios to see the effects. Users are isolated from eachother's changes until they explicitly save/refresh to/from database. This leads to the requirement that the domain model should always be manipulated locally (in memory) and only persisted to database when a user saves his scenario. But NHibernate seems to be mostly used in cases where you work directly against the database... The different options to use NHibernate for this, that i considered: 1) Load the entire domain model through NH and work on the detached objects. Save domain model by reattaching and persisting to db. One disadvantage is that i can't use NHibernate's query system, because that will either hit the db where other users might have persisted their scenario already, or hit the 2nd level cache, but then i have trouble with object identity (i think). 2) The humongous session approach, which isn't really an option, from what i understand. 3) Somehow make a kind of branch from your master database (e.g. import everything into SQLite) and use NHibernate against the branched database. Saving then becomes a matter of merging one database into another. (Any good tools for that?) Please point out any flaws in my reasoning, or options i didn't consider. Thanks in advance
-- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
