You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using rom-rb with rom-sql and rom-factory.
In short, a struct creation via factory (Factory.structs[:foo]) is not using default type value unless schema also has unrelated jsonb type field.
Took me forever to isolate the source of issue to that jsonb type column 😅
trafium
changed the title
Inconsistent behaviour with default values in factories
Inconsistent behaviour with default schema values in factories
Jul 2, 2021
Thanks for reporting and isolating the issue. I'm working on rom 6.0 at the moment but rom-factory will be greatly improved and upgraded along with rom 6.0. I will make sure all known issues are addressed, including this one.
Describe the bug
I am using rom-rb with rom-sql and rom-factory.
In short, a struct creation via factory (
Factory.structs[:foo]
) is not using default type value unless schema also has unrelatedjsonb
type field.Took me forever to isolate the source of issue to that
jsonb
type column 😅To Reproduce
Example repo:
https://github.com/trafium/rom_factory_bug
To run:
The output is:
Expected behavior
I am not sure what is the expected behaviour for
rom-factory
, but I would expect it should always use default values for factory structs creation.My environment
The text was updated successfully, but these errors were encountered: