-
Notifications
You must be signed in to change notification settings - Fork 89
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
New stable release #63
Comments
Hi @lblazecki, thanks for raising the issue. I suppose there are two problems to fix here: #64 and that we haven't put the new version for factory-girl-sequelize yet. Sorry for the confusion that you had to face, but we'll need another 1-2 weeks to sort everything out. |
@chetanism thank you for your response :) |
Hi @lblazecki, we just managed to fix #64 as well as add a Sequelize adapter to factory girl itself. |
Hi @chetanism I faced an issue:
This is the line in code:
When |
@lblazecki, if I am right, the issue is probably because of Thanks for pointing out the issue. Here is what you can do to keep things working at your end, till we get this fixed:
I have just pushed the updated build to the above mentioned branch. This should keep you going while we fix the issue. |
Thank you :) |
I can't seem to get v4 working with Sequelize 3.24.4. I think npm installed factory-girl 4.0.0-beta.7. Here's my setup: var factory = require('factory-girl');
const adapter = new factory.SequelizeAdapter();
factory = factory.factory;
const Models = require('../../models');
factory.define('products', Models.products, {
name: 'Some Foo',
priority: 50,
}); At this point I get I'm using sequelize's Any ideas? |
Solved. Looking at the source of the failure message, here: https://github.com/aexmachina/factory-girl/blob/7e4335330a4e85d4c6c2ecf9a881df8ff9b77965/src/adapters/DefaultAdapter.js#L4 It looked like I just wasn't initializing the SequelizeAdapter properly, so I was hitting the DefaultAdapter. I would have noticed that earlier, but I'm running my tests in mocha and it took me forever to figure out how to get a trace from Node's UnhandledPromiseRejectionWarning via the unhandledRejection event. In case anyone else is curious, just added this to the mocha test file: process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p);
console.log('reason:', reason);
}); Anyway, I just needed to call var factory = require('factory-girl');
const adapter = new factory.SequelizeAdapter();
factory = factory.factory;
factory.setAdapter(adapter);
const Models = require('../../models');
factory.define('products', Models.products, {
name: 'Some Foo',
priority: 50,
}); |
Hi @createthis, glad that your problem is solved. I did saw the mail for this issue, but couldn't find time to look into it. Thanks for posting the comment, it would help if someone else faces the issue. |
@gunar, it should happen soon! |
@chetanism what about now? 😇 |
I've published v4 🎉 Thanks everyone who's contributed to this release, and sorry it took us so long to get it released! |
@createthis THANK YOU SO MUCH FOR POSTING YOUR SOLUTION!!!! |
Hello
I like your work. Factory_girl is module that is much needed in nodeJS community.
Unfortunately, I didn't managed to connect new factory_girl version with sequelize adapter factory_girl.
When do you think new stable version will be out?
The text was updated successfully, but these errors were encountered: