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

    add error with included field which is primary key from another dataSource

    SmartClient Version: SNAPSHOT_v12.1d_2019-05-15/EVAL Deployment (expires 2019.07.14_07.21.56) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

    Hello, I've got a dataSource with an includeFrom field, which is included via two joins, ie includeFrom="dsA.dsB.ID_REC", and ID_REC is the primaryKey of the dsB.

    If I execute, client side, an addData, I get this error:

    2019-05-16T22:00:09,951 WARN  RequestContext dsRequest.execute() failed:  
    com.isomorphic.base.UpdateWithoutPKException: Criteria received from the client for add operation is missing the following non-sequence primary key fields: [ID_REC]. Either provide all primary key fields that are not sequences, or set allowMultiUpdate on the OperationBinding
        at com.isomorphic.sql.SQLDataSource.SQLExecute( ~[isomorphic_sql.jar:?]
        at com.isomorphic.sql.SQLDataSource.processRequest( ~[isomorphic_sql.jar:?]
        at com.isomorphic.sql.SQLDataSource.executeAdd( ~[isomorphic_sql.jar:?]
        at com.isomorphic.datasource.DataSource.execute( ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.application.AppBase.executeDefaultDSOperation( ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.application.AppBase.executeAppOperation( ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.application.AppBase.execute( ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.datasource.DSRequest.execute( ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.servlet.IDACall.handleDSRequest( [isomorphic_core_rpc.jar:?]
    it seems as it's trying to use the includeFrom primary key in the insert (while it must be excluded).

    The workaround is actually simple, as the join is already present due to other included fields, I'm using a customSelectExpression for this field.

    Nevertheless, I think this is a bug.

    mh, maybe I could do it in a simpler way, as includeFrom="dsA.fk_to_dsB", I'll test it.


      Originally posted by claudiobosticco View Post
      mh, maybe I could do it in a simpler way, as includeFrom="dsA.fk_to_dsB", I'll test it.
      Yes, this works. I don't know if it may be considered a bug, nevertheless.


        This seems to be a bug and we'd like to fix it, but we could not reproduce it. Could you provide more details please?


          Hello, I've just sent an email to your support address with more details.


            This is fixed and will be available for download in nightly builds since June 13 (tomorrow). Let us know please how it worked for you.


              SNAPSHOT_v12.1d_2019-06-17/EVAL Deployment

              Hello, sorry for the late reply, I can confirm it's fixed, thank you very much.