-
Notifications
You must be signed in to change notification settings - Fork 8
Let's define a model field as primaryKey that will be used on the POST /records and validated with the recordId on PUT #274
Comments
Do you mean |
Yeah, the title is not really self-explanatory. What (I understood) we want here is a way to actually have a field of the data filled from data that's externally provided. For instance, we could have a field which matches the hawk id we're using, or have a field which is filled using the name of the model. |
Okay, I believe I understood... Something like that :
With some constants like MODELNAME etc. Well... I would have relied on the client to do that, but since I guess it should not be forged we have to do something server-side. I still would like to see an explicit use-case to judge if the solution is relevant. For example, it can slightly be related to #222 |
Actually we have two different things: the first one, the "autofill" type, which is useful when we want to associate a creator to a record, as you shown (for instance), and we also need a way to have the server check for us that the id of a record matches a specific notion (for instance the hawkid, or the firefox accounts email). So that we are sure that |
Ideally, it should have several obvious use-cases (the creator isn't one, since we can have #222). And from what you describe, I don't see it very generic and reusable :( |
No that's not what I was talking about. The idea is more having a field that IS the record primary key.
Then if I do a POST with:
It will answer:
Also it will fail to validate if I do a PUT on /records/something if this something isn't toto. |
No description provided.
The text was updated successfully, but these errors were encountered: