Skip to content

Reject duplicate column names when building record values from IDataReader #652

Description

@Seddryck

Problem

BuildRecordValue passes each IDataReader.GetName(i) value to RecordValue.Set.

When the reader exposes duplicate column names, the later value replaces the earlier value in the backing dictionary. This silently loses data.

Expected behavior

Validate column names before calling RecordValue.Set and reject duplicate names explicitly.

A duplicate column name should throw a FormatException rather than overwrite an existing field.

Acceptance criteria

  • Duplicate names returned by IDataReader.GetName(i) are detected before values are inserted into the record.
  • A duplicate name raises FormatException.
  • Existing behavior for unique column names remains unchanged.
  • Add a reader-normalization regression test using duplicate GetName values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions