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

two or more params for faker aren't supported #103

Closed
mishelen opened this issue Feb 18, 2020 · 3 comments
Closed

two or more params for faker aren't supported #103

mishelen opened this issue Feb 18, 2020 · 3 comments

Comments

@mishelen
Copy link

mishelen commented Feb 18, 2020

Seems that I can't use such definition:

entity: Ring
items:
  ring{0..10}:
    date: '{{date.past(5, '2018-01-01')}}'

because this method gets only one param which is:
5, '2018-01-01' concatenated string

@mishelen mishelen changed the title two or moew params for faker aren't supported two or more params for faker aren't supported Feb 18, 2020
mishelen added a commit to abahachuk/ptushki-backend that referenced this issue Feb 18, 2020
issue with two or more params - they aren't supported
RobinCK/typeorm-fixtures#103
@RobinCK RobinCK closed this as completed Mar 9, 2020
@mishelen
Copy link
Author

Was this issue resolved? To be honest, I confused that it closed without any explanation.

@taylorhakes
Copy link

taylorhakes commented Aug 21, 2022

I was looking into this as well. Looks like a limitation of the faker function this library is using
https://fakerjs.dev/api/helpers.html#fake

Specifically:

Currently it is not possible to set more than a single parameter.
It is also NOT possible to use any non-faker methods or plain javascript in such templates.

@lordrip
Copy link

lordrip commented May 21, 2023

Maybe a workaround could be leveraging Processors? Here's an example of what I'm referring to 😃

#188 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants