Open glensc opened 10 years ago
my proposals:
as it's not always possible to reorder items so they are declared first before being used (if more complex relations are used)
the second problem with delete from table
can be hacked to reset merged_id
before fixture load:
update customer set merged_id=null;
but that's complicated, so instead maybe disable FK checks, like mysqldump does:
START TRANSACTION;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
DELETE FROM `customer`;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
Although there's no Propel 1/2 adapter yet for https://github.com/nelmio/alice, I'm considering rather to throw out our fixtures loader and reference to the more powerful fixtures loader of nelmio. Writing a Adapter for Propel in Alice would be easy. WDYT @propelorm/propel ? Would be a maintainance less and we have a better fixtures loader to show.
+1 on the adapter.
:+1: alice is awesome and having less classes in propel would be a great thing.
:+1: great idea
Is someone able to make a PR here with suggested changes?
seems fixtures dump creates fixture in order that it can later not load:
if i swap items order, then it starts to work, i.e problem with self references
seems similar problem exist if it tries to delete whole table, for example after the fixture has been loaded, load it again: