Bug: SqlTopicRepository
: Implicitly IsDirty()
topics not being saved
#73
Labels
Area: Repositories
Relates to the `ITopicRepository` interface or one of its implementations.
Priority: 1
Severity 2: Major
Status 5: Complete
Task is considered complete, and ready for deployment.
Type: Bug
Behavior that is inconsistent with documented or expected behavior.
Milestone
If a
Topic
contains anAttributeRecord
that is marked asIsExtendedAttribute
, but which corresponds to aAttributeDescriptor
that is not marked asIsExtendedAttribute
—or vice versa!—then it is treated asIsDirty()
implicitly by theTopicRepository.GetAttributes()
method, even if theAttributeRecord
is otherwise clean. This is important as it allows attributes that have been toggled between indexed and extended storage to be updated duringSave()
. This functionality is well-established and covered by extensive unit tests.Unfortunately, this rule is not being honored by the
SqlTopicRepository
implementation, which does not have good unit test coverage due to the challenges of mocking the SQL interfaces (e.g.,SqlConnection
,SqlCommand
, &c.). Looking at the code forSave()
, it appears that this rule is being honored when evaluating indexed attributes that have been moved to extended attributes, but not the other direction.The text was updated successfully, but these errors were encountered: