Fluent hibernate provides various decent methods that allow you to map class members with table fields. I have tried using the .Default() method while mapping which works fine for numbers but for string datatype this is not working.
So have looked into the actual execution of sql which looks like (ie.. I have added a new member to the class and want all exists rows to have a default value)
update dept set location = Manchester
Then I have realised single quote(') were missing for the value which should look like
update dept set location = 'Manchester'
Now I have updated my mapping as follows
Map(x => x.location).Default("'Manchester'").Not.Nullable();Never trust anything that can think for itself if you can't see where it keeps its brain.