Nhibernate hasmany not updating

Read Collection Elements(Object[] row, IData Reader result Set, ISession Implementor session) in D:\source\elysium\Elysium. Web\FNH\src\NHibernate\Loader\Loader.cs:326 NHibernate.

nhibernate hasmany not updating-31nhibernate hasmany not updating-70nhibernate hasmany not updating-43

I've got a simple phone directory app using Fluent NHibernate 1.1.

In the app, a "Person" object has many "Phone Number" objects.

Web\FNH\src\NHibernate\Persister\Collection\Abstract Collection Persister.cs:703 NHibernate.

Read Index(IData Reader rs, String[] aliases, ISession Implementor session) in D:\source\elysium\Elysium. Web\FNH\src\NHibernate\Collection\Persistent List.cs:120 NHibernate.

I am having a gap in understanding and I would appreciate any help.

When I create a Has Many relationship using a list, nhibernate creates an "index" column on my child table. In few articles, they even suggested that just forget about what is “inverse”, and always put inverse=”true” in the collection variable. This statement is always true – “put inverse=true in collection variable”, but do not blindfold on it, try to understand the reason behind is essential to optimal your Hibernate performance. Read From(IData Reader rs, ICollection Persister role, ICollection Aliases descriptor, Object owner) in D:\source\elysium\Elysium. Web\FNH\src\NHibernate\Loader\Loader.cs:706 NHibernate. Read Collection Element(Object optional Owner, Object optional Key, ICollection Persister persister, ICollection Aliases descriptor, IData Reader rs, ISession Implementor session) in D:\source\elysium\Elysium. Web\FNH\src\NHibernate\Loader\Loader.cs:385 NHibernate. I'm trying to delete a Person and I want to cascade deletes to Phone Numbers. However, attempting to delete the parent object still throws an exception--it appears that NHibernate is trying to update the child table to set the parent ID to null instead of just deleting the record: It works; Here is what each cascade option means: none - do not do any cascades, let the users handles them by themselves.

Tags: , ,