Announcement

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

    operationBinding.customValueFields ignored in DMI?

    SmartClient Version: SNAPSHOT_v12.1d_2019-04-11/EVAL Deployment (expires 2019.06.10_07.20.59) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)
    and
    SmartClient Version: v11.1p_2019-02-28/Enterprise Deployment (built 2019-02-28)

    Hello, I've got a field declared like this:
    Code:
        <fields><field name="TEST" type="text" customSQL="true"></field></fields>
    (it's the only field because the other fields are inherited)
    And I'm creating an add DSRequest in a DMI method:
    Code:
            DSRequest dsRequest = new DSRequest("JPC_NAZIONI", DataSource.OP_ADD, rpcManager);
            dsRequest.setValues(DataTools.buildMap("ALPHA2", "TT", "NOME", "Test", "ALPHA3", "TTT", "IS_ATTIVA", true, "NOME_EN", "Test", "CODICE_CF", "test",
                    "TEST", "foo"));
            DSResponse dsResponse = dsRequest.execute();
    the add operationBinding declares customValueFields:
    Code:
    <operationBinding operationType="add" customValueFields="TEST"/>
    But the 'TEST' field is not included in the INSERT:
    Code:
    2019-04-15 17:07:27,973 DEBUG DataSource [builtinApplication.null] post-validation valueSet: [
        {
            TEST:"foo",
            ALPHA2:"TT",
            IS_ATTIVA:true,
            ALPHA3:"TTT",
            NOME_EN:"Test",
            NOME:"Test",
            CODICE_CF:"test"
        }
    ] 
    2019-04-15 17:07:27,981 INFO  SQLDataSource [builtinApplication.null] Performing add operation with
        criteria: {TEST:"foo",ALPHA2:"TT",IS_ATTIVA:true,ALPHA3:"TTT",NOME_EN:"Test",NOME:"Test",CODICE_CF:"test"}    values: {TEST:"foo",ALPHA2:"TT",IS_ATTIVA:true,ALPHA3:"TTT",NOME_EN:"Test",NOME:"Test",CODICE_CF:"test"} 
    2019-04-15 17:07:27,996 DEBUG SQLValuesClause [builtinApplication.null] Sequences: {ID_REC=SEQUENCE_ID_REC} 
    2019-04-15 17:07:28,083 DEBUG PoolableSQLConnectionFactory [builtinApplication.null] makeObject() created an unpooled Connection '1181222953' 
    2019-04-15 17:07:28,083 DEBUG SQLConnectionManager [builtinApplication.null] Borrowed connection '1181222953' 
    2019-04-15 17:07:28,084 DEBUG SQLTransaction [builtinApplication.null] Started new dbJpcEP transaction "1181222953" 
    2019-04-15 17:07:28,085 DEBUG SQLDataSource [builtinApplication.null] Setting DSRequest as being part of a transaction 
    2019-04-15 17:07:28,085 INFO  SQLDriver [builtinApplication.null] Executing SQL query on 'dbJpcEP' using connection '1181222953': INSERT INTO DBSALES.JPC_NAZIONI (ALPHA2, ALPHA3, CODICE_CF, IS_ATTIVA, NOME, NOME_EN, ID_REC) VALUES ('TT', 'TTT', 'test', 'T', 'Test', 'Test', DBSALES.SEQUENCE_ID_REC.NextVal)
    Actually I see this log before:
    Code:
    2019-04-15 17:12:15,210 WARN  DataSourceDMI operationBinding for DataSource: JPC_NAZIONI with operationType: addJPC_NAZIONI_add does not have a <serverObject> in force and does not specify any operationBinding settings that could affect its behavior. This operation will almost certainly give the same result as a default operation, and so is almost certainly unnecessary
    does it mean that it's also ignoring the customValueFields attribute?
    Is it expected behaviour server-side?
    Is it available a different strategy to include a field marked with customSQL=true in a server-side method?

    #2
    This is fixed and is/will be available for download:
    - for version 12.1 since Apr 25 (today)
    - for earlier versions including 11.1 since Apr 26 (tomorrow)

    Comment


      #3
      SmartClient Version: SNAPSHOT_v12.1d_2019-04-29/EVAL Deployment (expires 2019.06.28_09.18.25) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

      Hello, I'm testing this build, the WARN is gone, but the field is still not included in the INSERT.

      Comment


        #4
        Apologies for incomplete fix. This is fixed now though and is/will be available for download:
        - for version 12.1 since May 3 (today)
        - for earlier versions including 11.1 since May 4 (tomorrow)

        Comment


          #5
          SmartClient Version: SNAPSHOT_v12.1d_2019-05-03/EVAL Deployment (expires 2019.07.02_07.21.10) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

          I can confirm it's fixed, thank you very much.

          Comment

          Working...
          X