Fork me on GitHub
#datomic
<
2015-07-09
>
domkm14:07:37

Has anyone done user account merging in Datomic? I haven’t seen this topic addressed.

tcrayford14:07:02

domkm: don't think there's anything datomic specific in there, right?

domkm14:07:40

@tcrayford: Sure. Bear with me because I don’t have much experience with Datomic so this question could be due to my ignorance. Specifically, I’m not sure how I’d deal with historic references that point to the wrong user entity. Let’s say you annotate transactions with the user who made the change for auditing but later that user is merged into another user.

domkm14:07:27

@tcrayford: There’s nothing specific to Datomic about this question in terms of reading the most recent data but I don’t think I understand the implications of merging user accounts when it comes to Datomic time travel.

tcrayford14:07:52

@domkm: you can't change the past 😉 So in those cases, the old transaction references would point to the old user

tcrayford14:07:25

but it seems to me like you could store "this user was merged with user YYY" on that user (remember attributes are flexible compared to rows) and know about that at query time

domkm14:07:41

@tcrayford: So retract one of the user entities and assert a ref like user/merged-with that refers to the remaining user?

tcrayford14:07:10

that's probably what I'd do

domkm14:07:21

Okay, thanks simple_smile

jthomson14:07:17

I've used a recursive rule in such situations, so you can have user/merged-with -> user/merged-with -> user

ghadi21:07:51

Does a full Datomic license cover HA use in non-prod / dev scenarios? I forget

marshall21:07:50

@ghadi: Yep, you can use all features in testing/dev.

ghadi21:07:45

thanks, Marshall