-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Updating from 6.2.0 -> 6.4.2 is a breaking change for us: "Do not define "id". Instead, rely on the database to generate it." #1602
Comments
Within the context @pyromaniac, I think we can close this "bug". It's more like a configurable feature. p.s. this feature was a surprise to me, too. |
I'd suggest a more prominent announcement, e.g., at the top of the README, to close this one out. |
I'm happy that there is a feasible way to revert back to the old behavior and this has addressed my personal needs. I do however agree with @BiggerNoise : a more prominent mention would be very helpful. What about either:
|
Agree that being able to revert to the previous behavior has met my needs as well. I think @MarcusRiemer documentation suggestions would be very helpful, would a P/R be helpful? |
One issue with turning off via |
Seems like the kind of breaking change that should warrant a major version number increment. |
It seems that `factory_bot_rails` unexpectedly introduced a breaking change. thoughtbot/factory_bot#1602 For now I'm just going to avoid that version while we decide what to do about it: bullet-train-co/bullet_train-core#707
It seems that `factory_bot_rails` unexpectedly introduced a breaking change. thoughtbot/factory_bot#1602 For now I'm just going to avoid that version while we decide what to do about it: bullet-train-co/bullet_train-core#707
Description
We are modeling tree structures in with
UUID
primary keys. We specifically choseUUID
as type because among other benefits we can generate those IDs in the application and send whole trees to the database in a single transaction without having to go back and forth for each new node we are inserting.Reproduction Steps
We have this factory:
Expected behavior
The instance should be constructed with identical values for
id
androot_id
(as was the case with FactoryBot 6.2.0). Alternatively we would be fine with overriding this behavior but browsing the Readme or the web for "Do not define "id". Instead, rely on the database to generate it." didn't yield any helpful results.Actual behavior
Creating instances worked just fine with FactoryBot
6.2.0
, but since at latest6.4.2
this results in the following error:System configuration
factory_bot version: 6.4.2
rails version: 7.0.8
ruby version: 3.2.2
The text was updated successfully, but these errors were encountered: