om

Please ask the channel first, not @dnolen directly!
cycle337 2017-09-20T10:09:42.000314Z

:)

wilkerlucio 2017-09-20T20:46:22.000288Z

Hello people, I would like to ask your opinion on something. Over the internet when we see Om.next code examples, most of then (all that I saw) demonstrate the creation of idents as [:group/by-id], [:user/by-email], always with the -by pattern. Recently I was trying something different, and did remove the by-, and some notable differences are: in some cases I can just use it directly as a Datomic lookup ref; it makes easier to translate in query fields. In summary, by removing the by- I feel like I had one less translation step to do. So I wonder how are you defining your component idents? Are you using the by- pattern? Did anybody tried to use a generic :db/id for everything?

levitanong 2017-09-20T22:01:34.000356Z

@wilkerlucio I use the by- pattern. I’ve thought a bit about switching to match datomic’s lookup refs, but I’m kind of uncomfortable about having a property that looks exactly like the dictionary of its own parent. I’m not keen on :db/id because you lose information on what the thing is. For example, for a client project, because of oracle, we have to rely on combination fields to convey identity, so I have to do something like [foo/by-path [0 2 :bar 4]] if there are several components that make use of “paths”, then it’s useful to know what object it is.

wilkerlucio 2017-09-20T23:07:38.000307Z

@levitanong interesting, makes total sense when using tables where the identities are clear