Open adrien-may opened 2 years ago
@adrien-may We have the entity property on the Factory class as it is mentioned in the readme
export class NormalUserFactory extends Factory<User> {
entity = User
}
Isn't this what you are looking for?
Hi there, I meant if a User model has an "entity" field, we cannot write:
export class UserFactory extends Factory<User> {
//model
entity = User;
// fields
entity = 'foo';
In Factory Boy, classes uses a
class Meta
to defined the model. With the implementation you made, we can't build a typeorm entity containing a field called "entity". Any plan to support it ?