Keep in mind that your objects are not a direct 1:1 map to your database. Business objects should be designed around business use cases and behavior, not around the data.
So it is perfectly fine to have your objects keep track of this authoritative concept one way in memory, and to persist that concept to the database in a different way.
In your object model, it isn't probably the responsibility of the Appraisal to know that it is authoritative, as much as it is the responsibility of the Property to know which Appraisal is the authoritative one. You can handle that through a simple object reference - Property would contain a reference like _authoritativeAppraisal along with its reference to the collection of all Appraisal objects.
One option (probably too late :) ) would be to use Guids for child objects as a surrogate key.
Barring that, as Rocky mentions, if you store a reference to the authoritative appraisal ID instead of the key, then you can retain a reference to new and old object alike.
For my "primary" situations like this in the database, I typically have:
Property ----- Appraisal
|
AppraisalPrimary (PropertyId (Pk), AppraisalId)
When updating each appraisal, I would include the following parameter to the SP:
@IsPrimary = (property.AuthoritativeAppraisal = = this);
If you store the Authoritative appraisal Id in the property table (a FK to appraisal, which is a bit of a circular ref) you can probably update "authoritativeappraisalId" in the appraisal update/insert SP, as the table row will be there at that point.
Just my two cents.
Copyright (c) Marimer LLC