ArkerLabs / redisk

TypeScript ORM for Redis.
33 stars 8 forks source link

Can't save entity with array #6

Open alexander-kiriliuk opened 4 years ago

alexander-kiriliuk commented 4 years ago

Why entities with arrays (nested entities) is not saved?

  @Property()
  slots: AnythingDTO[];

AnythingDTO - it is entity too.

Nytyr commented 4 years ago

Hello! Right now we only support N to 1 relationships with:

  @HasOne(type => Group, {cascadeInsert: true, cascadeUpdate: true})
  @Property()
  public group: Group;

I will add 1 to N relations soon. Maybe for now you can do a workaround by changing the relationship.