Skip to content
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

Many-to-many seeds example? #13

Open
dlogvinenko opened this issue Jun 14, 2015 · 4 comments
Open

Many-to-many seeds example? #13

dlogvinenko opened this issue Jun 14, 2015 · 4 comments

Comments

@dlogvinenko
Copy link
Contributor

Does someone have good example for many-to-many object relation seeds?

@givanse
Copy link
Contributor

givanse commented Jun 15, 2015

The unit tests have an example, look at the tests and the models definitions.

@lykmapipo
Copy link
Owner

@VORT3X

Hope @givanse info helps.

@dlogvinenko
Copy link
Contributor Author

Not really, I found hardcoded ids, but thats not what I want to do. If someone have better examples, please let me know. That's not many-to-many ;) It's one-to-many.

it('should be able to associate many-to-many', function(done) {
        var seeds = {
            UserSeed: {
                id: 1
            },
            GroupSeed: {
                name: 'group many-to-many',
                manyManyUsers: [1]
            }
        };

@jimjamdev
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants