I think I've found a bug in the class generation for ProxyStubs. When it generates the property for the table's primary key, it seems to use the incorrect metadata member to get the columns old key value. I think "AddressMetadata.PropertyNames.AddressId" below should be "ActivityMetadata.ColumnNames.ActivityId". At least, changing it to that makes it work as expected. :)
Code:
[DataMember(Order=0, EmitDefaultValue=false)]
public System.Int32? AddressId
{
get
{
if (this.Entity.es.IsDeleted)
return (System.Int32?)this.Entity.
GetOriginalColumnValue(AddressMetadata.PropertyNames.AddressId);
else
return this.Entity.AddressId;
}
set { this.Entity.AddressId = value; }
}