forked from petejkim/factory-lady
-
Notifications
You must be signed in to change notification settings - Fork 86
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
How to define @many to many ? #144
Comments
You have to do this manually. It doesn't seem that this factory-girl supports N:N relationships. It depends on your db adapter, but with Sequelize I'm doing this:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I currently have a user table, a role table, and the relationship between users and roles is many-to-many, so there is a middle table of user_role. How to configure it
user table:
id | name | age
role table:
id | name
user_role table:
user_id | role_id
The text was updated successfully, but these errors were encountered: