shiftcode / dynamo-easy

DynamoDB client for NodeJS and browser with a fluent api to build requests. We take care of the type mapping between JS and DynamoDB, customizable trough typescript decorators.
https://shiftcode.github.io/dynamo-easy/
MIT License
206 stars 27 forks source link

PartitionKey mapper option #316

Closed Mararok closed 4 years ago

Mararok commented 4 years ago

Can you add mapper option to PartitionKey decorator ?

Now I must hack it with other field

export class UserDynamoDb implements User {
  @PartitionKey()
  public _id: string;

  @Transient()
  public id: UserId; // after 'store.get(...)' I must setup it manually 

  @Property()
  public username?: string;
}

It will be very helpful for me :)