Announcement

Collapse
No announcement yet.
X
  • 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:

    Code:
    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(SQLDataSource.java:1700) ~[isomorphic_sql.jar:?]
        at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:440) ~[isomorphic_sql.jar:?]
        at com.isomorphic.sql.SQLDataSource.executeAdd(SQLDataSource.java:393) ~[isomorphic_sql.jar:?]
        at com.isomorphic.datasource.DataSource.execute(DataSource.java:2482) ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:646) ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:547) ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.application.AppBase.execute(AppBase.java:490) ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2889) ~[isomorphic_core_rpc.jar:?]
        at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:230) [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.

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

    Comment


      #3
      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.

      Comment


        #4
        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?

        Comment


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

          Comment


            #6
            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.

            Comment


              #7
              SNAPSHOT_v12.1d_2019-06-17/EVAL Deployment

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

              Comment

              Working...
              X