Open denismccarthykerry opened 2 years ago
Thanks for the report, I had a look but it isn't immediately trivial to fix, and I don't want to put much more effort into Facai. I also failed to get your example to run on H2, that would have helped a lot since it would've been easier to add a failing test case first.
Facai turned out to be a great proof of concept, but dogfooding it for a while did show it has some fundamental issues. One of them is the deferred abstraction which we're likely to get rid of.
I'm leaving Facai mostly as-is since it's used on a few dozen projects at this point, but any future effort will go towards a redesign in the form of Harvest.
Consider a typical foreign key relationship between two tables like this:
, with factories defined like so:
when attempting to
create!
sample data in Postgres using thelambdaisland.next.jdbc
namespace like so:a Postgres Exception is thrown:
This implies that the
:lambdaisland.facai.next-jdbc/table
value in thechild
factory is not being used, as would be expected in this configuration. This works for the standard case with nodefer
on the child factory, so it is probably related to the deferral.