session.Save(home.hobbydetail);
session.SaveOrUpdate("HobbyDetail", home.hobbydetail);//getting internal error as"Exception occurred getter of
Can you tell me why you are invoking Save and SaveOrUpdate?
Basically Save method will insert an entry if the identifier doesn’t exist, else it will throw error. If the primary key already present in the table, it cannot be inserted and the SaveOrUpdate calls save() or update() based on the operation. If the identifier
exists, it will call update method else the save method will be called.
Bimalvv
Contributor
2362 Points
481 Posts
Re: getting error as "Object does not match target type. "
Apr 06, 2012 01:39 PM|LINK
Can you tell me why you are invoking Save and SaveOrUpdate?
Basically Save method will insert an entry if the identifier doesn’t exist, else it will throw error. If the primary key already present in the table, it cannot be inserted and the SaveOrUpdate calls save() or update() based on the operation. If the identifier exists, it will call update method else the save method will be called.
NHibernate mvc3
Bimal