Partition Key on base class not found

Description

I made a base class for my entities. When inserting, Mapper throws error below.

Some partition key parts are missing: id

  • Same approach works in EntityFramework.

  • Problem is not with my connection, keyspace or table since when I carry the id field back to entity itself, it works.

My generic insert method

1 2 3 4 public void Insert<T>(T entity) where T : EntityBase { _mapper.Insert(entity); }

Does not work

1 2 3 4 5 6 7 8 9 10 11 public class EntityBase { [Column(name: "id")] public TimeUuid Id { get; private set; } = TimeUuid.NewId(); } [Table(Keyspace = "unimportant", Name = "irrelevant")] public class Irrelevant : EntityBase { //fields }

Works

1 2 3 4 5 6 7 [Table(Keyspace = "unimportant", Name = "irrelevant")] public class Irrelevant { [Column(name: "id")] public TimeUuid Id { get; private set; } = TimeUuid.NewId(); //fields }

 

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

Doruk Uluçay

Labels

Reproduced in

None

PM Priority

None

Fix versions

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Doc Impact

None

Reviewer

None

Epic Link

None

Sprint

None

Size

None

Components

Affects versions

3.11.0

Priority

Major