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

optional forced flush on SQLAlchemyModelFactory #262

Merged
merged 2 commits into from Feb 9, 2016

Conversation

Projects
None yet
3 participants
@zetsub0u

zetsub0u commented Jan 6, 2016

fixes FactoryBoy/factory_boy#81

Should allow the user to force a session flush after each model gets created for different scenarios described in #81 by defining force_flush = True in the Meta of the SQLAlchemy Factory implementation.

@rbarrois

This comment has been minimized.

Show comment
Hide comment
@rbarrois

rbarrois Jan 7, 2016

Member

Thanks! I've just merged this as 4172dd6.

I've seen that you've even updated the docs, thanks a lot!
Would you mind adding a couple of tests for this, though?

Thanks again :)

Member

rbarrois commented Jan 7, 2016

Thanks! I've just merged this as 4172dd6.

I've seen that you've even updated the docs, thanks a lot!
Would you mind adding a couple of tests for this, though?

Thanks again :)

@zetsub0u

This comment has been minimized.

Show comment
Hide comment
@zetsub0u

zetsub0u Jan 7, 2016

Sure, i'll send some tomorrow, any idea when the next release is gonna be so we can use this from pip?

Thanks!

zetsub0u commented Jan 7, 2016

Sure, i'll send some tomorrow, any idea when the next release is gonna be so we can use this from pip?

Thanks!

@jeffwidman

This comment has been minimized.

Show comment
Hide comment
@jeffwidman

jeffwidman Jan 7, 2016

Member

@minjung Thanks for making it a configurable option rather than forcing the flush.

Member

jeffwidman commented Jan 7, 2016

@minjung Thanks for making it a configurable option rather than forcing the flush.

@zetsub0u

This comment has been minimized.

Show comment
Hide comment
@zetsub0u

zetsub0u Jan 7, 2016

If we made it the default, tons of tests would have broken for some people :D When we changed this in our tests we saw that because we had incomplete model factories with missing fk constraints or unique constraints and what not, so we had to fix those if we wanted to flush.

zetsub0u commented Jan 7, 2016

If we made it the default, tons of tests would have broken for some people :D When we changed this in our tests we saw that because we had incomplete model factories with missing fk constraints or unique constraints and what not, so we had to fix those if we wanted to flush.

@zetsub0u

This comment has been minimized.

Show comment
Hide comment
@zetsub0u

zetsub0u Jan 7, 2016

I added some tests, one comment, it would be nice if the tests didn't need mongodb installed and running and such, i only ran the alchemy module in my machine anyway, but maybe an imporvement.

Let me know what you think and if you can when we can expect it to hit pypi,
Thanks for maintaining this.

zetsub0u commented Jan 7, 2016

I added some tests, one comment, it would be nice if the tests didn't need mongodb installed and running and such, i only ran the alchemy module in my machine anyway, but maybe an imporvement.

Let me know what you think and if you can when we can expect it to hit pypi,
Thanks for maintaining this.

@zetsub0u

This comment has been minimized.

Show comment
Hide comment
@zetsub0u

zetsub0u Jan 18, 2016

Hi, any news with this?

Thanks.

zetsub0u commented Jan 18, 2016

Hi, any news with this?

Thanks.

@jeffwidman

This comment has been minimized.

Show comment
Hide comment
@jeffwidman

jeffwidman Feb 8, 2016

Member

Bump

Member

jeffwidman commented Feb 8, 2016

Bump

@rbarrois rbarrois merged commit b8050b1 into FactoryBoy:master Feb 9, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rbarrois

This comment has been minimized.

Show comment
Hide comment
@rbarrois

rbarrois Feb 10, 2016

Member

Just released :)

Member

rbarrois commented Feb 10, 2016

Just released :)

@jeffwidman

This comment has been minimized.

Show comment
Hide comment
@jeffwidman

jeffwidman Feb 10, 2016

Member

👍

Member

jeffwidman commented Feb 10, 2016

👍

@zetsub0u

This comment has been minimized.

Show comment
Hide comment
@zetsub0u

zetsub0u Feb 10, 2016

Thanks!
On Feb 9, 2016 23:00, "Jeff Widman" notifications@github.com wrote:

[image: 👍]


Reply to this email directly or view it on GitHub
#262 (comment).

zetsub0u commented Feb 10, 2016

Thanks!
On Feb 9, 2016 23:00, "Jeff Widman" notifications@github.com wrote:

[image: 👍]


Reply to this email directly or view it on GitHub
#262 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment