Closed rogeraraujo90 closed 4 years ago
it's hard to say something without a yaml file
Sorry,
The related yaml files:
News:
entity: News
items:
new{1..5}:
title: '{{random.words}}'
subtitle: '{{lorem.words}}'
summary: '{{lorem.text}}'
url: '{{internet.url}}'
image: '{{image.imageUrl}}'
source: '@source*'
team: '@team*'
createdDate: '{{date.past}}'
updatedDate: '{{date.recent}}'
new{6..8}:
title: '{{name.title}}'
summary: '{{lorem.words}}'
url: '{{internet.url}}'
image: '{{image.imageUrl}}'
source: '@source*'
team: '@team*'
createdDate: '{{date.past}}'
updatedDate: '{{date.recent}}'
Comments
entity: Comment
processor: ./processors/CommentProcessor
items:
comment{1..40}:
text: '{{lorem.text}}'
news: '@news*'
author: '@user*'
createdDate: '{{date.past}}'
comment{41..50}:
text: '{{lorem.text}}'
parent: '@comment{1..40}'
author: '@user*'
createdDate: '{{date.recent}}'
With this content, I can't load the fixtures, the error is shown in console. If I remove team
from new{6..8}
works, and all comments are related with these news (without a team)
new{6..8} maybe news{6..8}?
Great! It's working now! Thank you so much! ๐
Your Environment
| Software | Version(s) | | typeorm-fixtures-cli | 1.8.0 | | Node | 14.5.0 | Yarn | 1.22.4 | Operating System | MacOs 10.15.7
I have the following relation:
@ManyToOne(() => Comment) @JoinColumn({ name: "parentId" }) parent: Comment | null;