In a lot of tutorials, I see tempid being used where it seems to serve no purpose. Here’s an example from a friendly walkthrough:
(d/transact conn [{:db/id (d/tempid :db.part/user)
:owner/name "Bob"
:owner/dogs [{:db/id (d/tempid :db.part/user)
:dog/name "Fluffy"
Every time we create a new entity, the example shows :db/id being manually generated. If I take out those lines all the examples still work. It seems like you’d use a temp ID if you were building a transaction where you were creating multiple entities with one transaction, but you weren’t, for whatever reason nesting them (as Gigasquid does in the linked examples).
I see at some point that one couldn’t leave these out and so maybe I’m just looking at old examples. Or is there some magic behind that :db.part/user segment that I’m overlooking?