RobinCK / typeorm-fixtures

:pill: Fixtures loader for typeorm 🇺🇦
https://robinck.github.io/typeorm-fixtures/
MIT License
566 stars 45 forks source link

reference own column in faker.helpers #65

Closed mreschke closed 5 years ago

mreschke commented 5 years ago

How can I reference the title of the current iteration to slugify it with faker.helpers.slugify. I would expect something like so

entity: Post
items:
  post{1..10}:
    title: '{{lorem.words}}'
    slug: '{{helpers.slugify(@title)}}'
    body: '{{lorem.paragraphs}}'
RobinCK commented 5 years ago

https://github.com/RobinCK/typeorm-fixtures#load-processor

mreschke commented 5 years ago

Powerful, thanks!