Announcement

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

    not possible to have same operationid for fetch and update?

    Hey, tried having two operationtypes share the same operationid, but have different methods being called, by configuring my ds.xml like this:

    Code:
            <operationBinding operationType="fetch" operationId="myAccount">
                <serverMethod>fetchMyAccount</serverMethod>
            </operationBinding>      
            <operationBinding operationType="update" operationId="myAccount">
                <serverMethod>updateMyAccount</serverMethod>
            </operationBinding>
    Fetch worked, but when i updated, the servermethod for the fetch operationtype was called again.


    EDIT: currently running 4.1-p20140608

    Is this not possible? Seems redundant to have the "operationtype" in that case.

    #2
    Hi mathias,

    you can define the same (or different) serverMethod for both.
    You'll need a ServerObject to handle the request.

    Best regards,
    Blama
    Last edited by Blama; 2 Sep 2014, 05:27.

    Comment


      #3
      operationId must be unique across all operationBindings in a DataSource.

      This doesn't stop you from calling the same method for two operationTypes via declaring the same ServerObject; in fact you can declare a ServerObject at the <DataSource> level to have all operationTypes go through a single DMI method.

      Comment

      Working...
      X