IRepository.Update

Topics: Writing modules
Oct 31, 2011 at 3:26 AM

I am working on a module and I need to update a record (not a part or content item etc.). When I call IRepository.Update(record) without the record Id, I get a new row in the db, If I omit the Id nothing happens. I believe the underlying NHibernate method is SaveOrUpdate and NHibernate is supposed to determine the method to perform (Save or Update), however I cannot figure out how to get this working. Any guidance will be appreciated. Thanks.

Oct 31, 2011 at 12:52 PM

anyone?

Oct 31, 2011 at 4:27 PM

no worries, got it figured out. I neeeded to retrieve the record first, change it and the call update.