Hi Isomorphic,
I have an enhancement suggestion for OperationBinding.
I always have a bad feeling when using allowMultiUpdate because of what you write in the docs:
How about a new attribute requiresField that denotes requires fields in the request. This way one could make sure that no client error will ever delete the table as in your warning.
For example if you want only to delete employees of a certain manager, you would denote "reportsTo" in requiresField.
Then if in some mysterious way there is no value transmitted for "reportsTo", the server would reject the request.
Of course this would also be possible in DMI, but it would be easier and I'd feel safer if it was done this way.
Of course it might not be enough to check the request's data, as most likely this would be sent in criteria. So perhaps the naming is not the best and it could be named requiresCriteriaField.
It then would check for presence of the fieldName in any criteria (not necessarily "fieldName equals x").
What do you think?
Best regards
Blama
I have an enhancement suggestion for OperationBinding.
I always have a bad feeling when using allowMultiUpdate because of what you write in the docs:
Warning: Be aware that this is a potentially dangerous setting and should be used with care. With this flag set, you have no guarantee that an update will not change or remove every row in a table.
For example if you want only to delete employees of a certain manager, you would denote "reportsTo" in requiresField.
Then if in some mysterious way there is no value transmitted for "reportsTo", the server would reject the request.
Of course this would also be possible in DMI, but it would be easier and I'd feel safer if it was done this way.
Of course it might not be enough to check the request's data, as most likely this would be sent in criteria. So perhaps the naming is not the best and it could be named requiresCriteriaField.
It then would check for presence of the fieldName in any criteria (not necessarily "fieldName equals x").
What do you think?
Best regards
Blama
Comment