I’m fiddling with entities in a REPL, and because of the way things are set up, it’s very easy to accidentally destroy things. I’m turning off isComponent where I find it, but I still seem to wake up and find pieces missing. Since all my fiddling is done under a single parent entity, “bas”, I’ve figured out I can just pull “bas” whenever I reach a stable point, and then tx on “bas” if I screw something up.
Anyway, when I’m done fiddling, I want to be able to take the child entities and move them bodily to stage and prod, so that I don’t have to repeat the potentially disastrous fiddling anywhere that counts.
This should be fine because the content started from the same source and periodically prod gets copied down to stage and dev, and asserting already true things about an existing entity is not a problem for Datomic—except that I’m adding new entities as well, and the IDs assigned in dev may be used for live data in prod.
In other words, I have template 123 which means “foo” and that’s fine because “foo” is 123 everywhere. But in my fiddling I’m going to add “bar”, and it gets 125 in dev. But, uh oh, a user registered in prod, and HE got the 125 ID, so Bad Things could happen if I try to assert that 125 is a “bar”.
Since “foo” and “bar” can be pulled by their parent “bas”, I was trying to do that, but maybe I need to pull “foo” by itself and “bar” by itself, and then remove the IDs from bar.
I think no matter what, I’ll have to remove the IDs from bar. Or is there an easier way to go about this?