You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dwwoelfel Is there a way to tell that a new entity is being created (both server-side and client-side), and either 1. require a :dato/guid k/v pair, or 2. auto-insert one? Would help with the "pit of success" story.
The text was updated successfully, but these errors were encountered:
The frontend does that by rejecting new entities without a :dato/guid. It could be configured to auto-insert one, but I think that might cause some data integrity problems. I think it's better to fail noisily than to silently insert unexpected data. We could write a helper for it, e.g. dato/create-new.
Server-side, we could also write a helper or maybe use a transactor function.
That's a good idea - I have an assert in broadcast-tx that checks that the
vals of the fid-map are not nil, so that's been helping me keep things
clean on the client. I reworked my data-gen ns after a major schema change,
and wasn't putting dato/guid on some stuff, and then seeing strange
behavior client-side. Perhaps the client should also fail noisily (in dev)
if it receives an entity from the server without a dato/guid?
On Wed, Aug 12, 2015 at 1:03 PM, Daniel Woelfel [email protected]
wrote:
The frontend does that by rejecting new entities without a :dato/guid. It
could be configured to auto-insert one, but I think that might cause some
data integrity problems. I think it's better to fail noisily than to
silently insert unexpected data. We could write a helper for it, e.g.
dato/create-new.
Server-side, we could also write a helper or maybe use a transactor
function.
—
Reply to this email directly or view it on GitHub #12 (comment).
@dwwoelfel Is there a way to tell that a new entity is being created (both server-side and client-side), and either 1. require a
:dato/guid
k/v pair, or 2. auto-insert one? Would help with the "pit of success" story.The text was updated successfully, but these errors were encountered: