Tuesday, 19 July 2011

How to just send the updated columns via NHibernate

Use the following attribute in the top of the mapping file to ensure your update statements are as succinct as possible

Dynamic-update="true"

This will ensure only those column values that have changed actually exist in the SET clause of the UPDATE statement, which is useful if your tables have triggers on them guarded by the TSQL IF UPDATE(MyColumnName) type checks.

No comments:

Post a Comment

Android mediaserver process killing battery life

If this happens to you, then do the following Force stop on Settings, Applications, All, Media Storage. Clear Cache and Clear Data, fo...