Nhibernate hasmany not updating
Thanks for your suggestion on how to handle these things.
I'll try to follow your advice and get rid of the trigger.
I am using Nhibernate with Fluent, to persist a MS SQL 2008 express database in a business application.
I have a class named Receipt which contains a list with many objects named Receipt Items.
Now for the problem: I also have a trigger on the sql table Receipt, that fires if the inserted. The trigger fetches new prices from the "supplier table", and updates the prices for all Receipt Items, in the Receipt Items table. Is there any way for nhibernate to ignore the error, and refresh its cache after the trigger fires?
straightforward class example definitions with Fluent mappings: I wouldn't attempt to combine both triggers and the use of a data layer such as nhibernate - you're always going to get synchronisation problems.
Public Must Inherit Class Base Fixture Protected Shared Read Only Log As log4net.
ILog = Get Logger() Private Shared Function Get Logger() As log4net.
We can infer that this means cascading is turned off for this relationship.
Second level cache is using an external provider for data storage.
Download the cache provider libraries from the link below.