Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Enhancement: OperationBinding with allowMulitUpdate add new "requiresField" attribute

    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:
    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.
    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
    Last edited by Blama; 15 Dec 2016, 07:59. Reason: Thread not finished, committed by accident.

    #2
    Bumper (Thread not finished, committed by accident).

    Comment


      #3
      Such an attribute makes sense, but is a very minor gain in expressiveness over a DMI, especially one declared via Server Scripting. Nevertheless, it's been taken under consideration.

      Comment

      Working...
      X