Skip to content

A generic interface with a primary key generic type parameter used with two different primary key types causes a domain build failure #332

Open
@ondrejtucny

Description

@ondrejtucny

When the following two entities are declared:

[HierarchyRoot(InheritanceSchema.SingleTable)]
[TableMapping("a_list")]
public sealed class AList : LegacyUserTrackedEntity, ICodebookEntity<short>
{
    [Key(0)]
    [Field]
    [FieldMapping("id_list")]
    public short Id { get; set; }
}

[HierarchyRoot(InheritanceSchema.SingleTable)]
[TableMapping("c_system")]
public sealed class CSystem : LegacyUserTrackedEntity, ICodebookEntity<int>
{
    [Key]
    [Field]
    [FieldMapping("id")]
    public int Id { get; set; }
}

DataObjects throws this error: Implementors of ICodebookEntity interface belong to hierarchies with different key structure: AList & CSystem.

However, the interfaces are ICodebookEntity<short> and ICodebookEntity<int> — two different things.

Using version 7.0.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions