public PropertyMap ReadOnly() { if (KeyType != KeyType.NotAKey) { throw new ArgumentException(string.Format("'{0}' is a key field and cannot be marked readonly.", Name)); } IsReadOnly = true; return this; }