I use ASP.Net with NHibernate accessing a Pgsql database.
For some of our Objects, we use NHibernate bags, which map to List objects in our application. Sometimes we have issues with needing to refresh the objects through NHibernate when we update anything to do with the lists in the database.
<bag name='Objects' inverse='true' lazy='true' generic='true' > <key column='object_id' /> <one-to-many class='Object' /> </bag>
Above is a sample of the code I use for our bags.
I was wondering if anyone else came across this issue anywhere, and what you do to work around it?
Have you tried NHibernate cascades, such as save-update?
Here is what each cascade option means:
More info here: NHibernate Cascades: the different between all, all-delete-orphans and save-update