EntityFactory using .map give me an error
See original GitHub issueI ran the example (User and Pet) that you have here and I am getting this error:
(property) User.pets: Pet[] This expression is not callable. Type 'Pet[]' has no call signatures.
I used this as seeder:
await factory(User)() .map(async (user: User) => { const pets: Pet[] = await factory(Pet)().createMany(2) const petIds = pets.map((pet: Pet) => pet.Id) await user.pets().attach(petIds) }) .createMany(5)
Any idea?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8
Top Results From Across the Web
Error creating bean with name 'entityManagerFactory' defined ...
I would start by adding the following dependency: <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.1.4.
Read more >Error creatigng EntityManagerFactory - CodeRanch
Hi, I'm trying to use the JBoss JPA, which is hibernate. Whenever I try to create/inject the EntityManagerFactory or the PersistenceContext it keeps ......
Read more >Error creating bean with name entityManagerFactory defined ...
In this post, we will see the possible reasons and fixes for the 'Error creating bean with name entityManagerFactory defined in class path ......
Read more >Hibernate ORM 5.4.33.Final User Guide - Red Hat on GitHub
Ultimately the application domain model is the central character in an ORM. They make up the classes you wish to map. Hibernate works...
Read more >Spring Data for Apache Cassandra - Reference Documentation
In this section, we try to provide what we think is an ... The same applies to the definition of the EntityManagerFactory bean....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I look up the source code, nothing is related to the
attachmethod. Finally, I use the following way to achieve thatseeds
/src/database/seeds/create-users.seeds.ts
factory
/src/database/factories/task.factory.ts
thanks, works well with me . my once editing to solve the error was shown to me is making
(faker: typeof Faker, context: ViewInterface | any)