typeorm-fixtures
typeorm-fixtures copied to clipboard
[Bug] $current not working on array fields
Your Environment
Software | Version(s) |
---|---|
typeorm-fixtures | 1.0.4 |
Node | 16.14.2 |
Yarn | 1.22.18 |
Operating System | Windows 10 |
$currnt is not working for arrays of relations, for example:
entity: FirstEntity
items:
firstEntity{1...10}:
name: 'FirstEntity($current)" # works
entity: SecondEntity
items:
secondEntity{1...10}:
name: 'SecondEntity($current))' # works
simpleRelation: '@firstEntity($current)' # works
arrayRelation:
- '@firstEntity($current)' # does not work, always gives '@firstEntity1'
- '@firstEntity($current + 1)' # does not work, always gives '@firstEntity2'
It doesn't also get current for the array index of an array field, because it is always 1, even when there is more than one entry in the array.