When to update audit fields? DDD
Posted
by
user676767
on Stack Overflow
See other posts from Stack Overflow
or by user676767
Published on 2012-08-31T15:25:41Z
Indexed on
2012/08/31
15:39 UTC
Read the original article
Hit count: 168
I have a Meeting Object:
Meeting{id, name, time, CreatedBy, UpdatedBy}
and a
MeetingAssignee{id, MeetingID, EmployeeId, CreatedBy, UpdatedBy)
Meeting, as Aggregate root, has a method AssignEmployee.
I was about to pass in the current user to the Meeting object as I call AssignEmployee, so that it can update its audit fields accordingly.
But this doesn't seem right - is it? Obviously I can keep the audit fields public and change them later - perhaps at service level?
What is everyone's else preferred method for updating these fields?
Please note: We are not using Nhibernate, but a custom ORM which does not have anything automatic in place.
Thanks.
© Stack Overflow or respective owner