Seeding relationships with `seed_generator`?
Is it possible to seed relationships inline with
seed_generator?
e.g. something along the lines of
Seems that belongs_to works OK using thing_id but I'm trying to seed some many_to_manys which doesn't seem to work as I'd expect. The docs I'm finding seem fairly sparse on this sort of thing so I'm really feeling my way around here 😅2 Replies
Seems like in general, using relationships by name isn't working as I'd expect. using IDs works for belongs_to but that seems to be it
For example, if I refactor the above to manually seed the join table record, I get something like
What's interesting is that
Ash.Generator.seed! seems to handle relationships by name great, it's just when you do it via seed_generator that the relationship names don't work 🤔Interesting. Thats probably a bug.