Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] $current not working on array fields #192

Open
CiotkaCierpienia opened this issue May 13, 2022 · 0 comments
Open

[Bug] $current not working on array fields #192

CiotkaCierpienia opened this issue May 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@CiotkaCierpienia
Copy link

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.

@CiotkaCierpienia CiotkaCierpienia added the bug Something isn't working label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants