Pete Michaud
Pete Michaud

Reputation: 1833

Automatically update AddedBy and EditedBy fields in SubSonic

I have a data model that includes common columns like addedBy, editedby (user), addedDate, editedDate.

Is there a setting I can use in SubSonic 2.1 that will automatically update these fields appropriately instead of having to explicitly specify in every update?

Upvotes: 0

Views: 183

Answers (1)

Michael Paladino
Michael Paladino

Reputation: 800

Check out http://subsonicproject.com/setup/subsonic-conventions/. SubSonic uses a convention-based approach when it comes to audit columns. If you can change your column names to CreatedBy, ModifiedBy, CreatedOn, and ModifiedOn respectively, then they will be updated automatically. I don't think there's a way to change what those names can be without making changes to the SubSonic source code.

Upvotes: 3

Related Questions