redisk icon indicating copy to clipboard operation
redisk copied to clipboard

Can't save entity with array

Open alexander-kiriliuk opened this issue 4 years ago • 1 comments

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

  @Property()
  slots: AnythingDTO[];

AnythingDTO - it is entity too.

alexander-kiriliuk avatar Aug 15 '20 11:08 alexander-kiriliuk

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.

Nytyr avatar Aug 18 '20 08:08 Nytyr