Announcement

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

    #16
    Hi David,

    The stale build issue was a red herring - it turns out that the test expression we posted had "userId" where it should have been "userID". The corrected test expression:

    Code:
    var boundForm = isc_DynamicForm_0;
    boundForm.editRecord({userID:1, email:"kamirov@server.com", firstName:"Dave", surname:"Barker"})
    boundForm.validate()
    .. produces the expected result (lack of validation error) in builds after 8/20.

    However, as to your original test, we notice a serverConstructor is used, so we can't fully run the test - what's in that serverConstructor? If you remove it and run your code against a post 8/20 build, are you still seeing a problem using "update" with isUnique?

    Comment


      #17
      dczech is out of town right now. I have his Ping code, with the serverConstructor removed. I am using the smartgwtpower-2.3 build from 8/26. I am getting the same results that he posted on 8/20

      Code:
      === 2010-08-27 11:28:52,117 [0-11] INFO  RequestContext - URL: '/Ping/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)': Moz (Gecko) with Accept-Encoding header
      === 2010-08-27 11:28:52,117 [0-11] DEBUG XML - Parsed XML from (in memory stream): 0ms
      === 2010-08-27 11:28:52,117 [0-11] DEBUG RPCManager - Processing 1 requests.
      === 2010-08-27 11:28:52,117 [0-11] DEBUG RPCManager - Request #1 (DSRequest) payload: {
          values:{
              id:4,
              name:"D",
              _selection_1:true,
              other:"other"
          },
          operationConfig:{
              dataSource:"PING",
              operationType:"validate"
          },
          validationMode:"full",
          appID:"builtinApplication",
          operation:"PING_validate",
          oldValues:{
              id:4,
              name:"D",
              _selection_1:true,
              other:"other"
          },
          criteria:{
          }
      }
      === 2010-08-27 11:28:52,117 [0-11] INFO  IDACall - Performing 1 operation(s)
      === 2010-08-27 11:28:52,117 [0-11] DEBUG AppBase - [builtinApplication.PING_validate] No userTypes defined, allowing anyone access to all operations for this application
      === 2010-08-27 11:28:52,117 [0-11] DEBUG AppBase - [builtinApplication.PING_validate] No public zero-argument method named '_PING_validate' found, performing generic datasource operation
      === 2010-08-27 11:28:52,117 [0-11] DEBUG AppBase - [builtinApplication.PING_validate, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
      === 2010-08-27 11:28:52,117 [0-11] DEBUG AppBase - [builtinApplication.PING_validate, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
      === 2010-08-27 11:28:52,117 [0-11] INFO  SQLDataSource - [builtinApplication.PING_validate, builtinApplication.null] Performing fetch operation with
      	criteria: {name:"D"}	values: {name:"D"}
      === 2010-08-27 11:28:52,117 [0-11] INFO  SQLDataSource - [builtinApplication.PING_validate, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
      === 2010-08-27 11:28:52,133 [0-16] INFO  RequestContext - URL: '/Ping/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)': Moz (Gecko) with Accept-Encoding header
      === 2010-08-27 11:28:52,133 [0-16] DEBUG XML - Parsed XML from (in memory stream): 0ms
      === 2010-08-27 11:28:52,148 [0-16] DEBUG RPCManager - Processing 1 requests.
      === 2010-08-27 11:28:52,148 [0-16] DEBUG RPCManager - Request #1 (DSRequest) payload: {
          criteria:{
              id:4
          },
          values:{
              id:4,
              name:"D",
              _selection_1:true,
              other:"other"
          },
          operationConfig:{
              dataSource:"PING",
              operationType:"update"
          },
          componentId:"isc_DynamicForm_0",
          appID:"builtinApplication",
          operation:"PING_update",
          oldValues:{
              id:4,
              name:"D",
              _selection_1:true
          }
      }
      === 2010-08-27 11:28:52,148 [0-16] INFO  IDACall - Performing 1 operation(s)
      === 2010-08-27 11:28:52,148 [0-16] DEBUG AppBase - [builtinApplication.PING_update] No userTypes defined, allowing anyone access to all operations for this application
      === 2010-08-27 11:28:52,148 [0-16] DEBUG AppBase - [builtinApplication.PING_update] No public zero-argument method named '_PING_update' found, performing generic datasource operation
      === 2010-08-27 11:28:52,148 [0-16] DEBUG AppBase - [builtinApplication.PING_update, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
      === 2010-08-27 11:28:52,148 [0-16] DEBUG AppBase - [builtinApplication.PING_update, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
      === 2010-08-27 11:28:52,148 [0-16] INFO  SQLDataSource - [builtinApplication.PING_update, builtinApplication.null] Performing fetch operation with
      	criteria: {name:"D"}	values: {name:"D"}
      === 2010-08-27 11:28:52,148 [0-16] INFO  SQLDataSource - [builtinApplication.PING_update, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
      === 2010-08-27 11:28:52,164 [0-11] DEBUG PoolableSQLConnectionFactory - [builtinApplication.PING_validate, builtinApplication.null] Returning pooled Connection
      === 2010-08-27 11:28:52,164 [0-11] INFO  SQLDriver - [builtinApplication.PING_validate, builtinApplication.null] Executing SQL query on 'Oracle': SELECT PING.id, PING.other, PING.name FROM PING.PING WHERE (PING.name='D')
      === 2010-08-27 11:28:52,164 [0-11] INFO  DSResponse - [builtinApplication.PING_validate, builtinApplication.null] DSResponse: List with 1 items
      === 2010-08-27 11:28:52,164 [0-11] DEBUG ValidationContext - [builtinApplication.PING_validate] Adding validation errors at path '/PING/name': {errorMessage=Value must be unique}
      === 2010-08-27 11:28:52,164 [0-11] INFO  Validation - [builtinApplication.PING_validate] Validation error: [
          {
              recordPath:"/PING",
              name:{
                  errorMessage:"Value must be unique"
              }
          }
      ]
      === 2010-08-27 11:28:52,164 [0-11] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2010-08-27 11:28:52,164 [0-11] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      === 2010-08-27 11:28:52,164 [0-11] INFO  Compression - /Ping/sc/IDACall: 181 -> 162 bytes

      Comment


        #18
        OK, we found the issue. It turned out to be the JDBC driver returning values as Integers whereas the value from the client was represented as a Long, and Java considers these values not equivalent with equals(). Fixed now, please grab the next nightly and confirm.

        Comment


          #19
          There hasn't been a new build since your last post. Will there be a new build tomorrow morning, August 31st?

          Comment


            #20
            A new build should appear within 3-4 hours.

            Comment


              #21
              Yes, that works. I was able to update existing records. Thanks.

              Comment


                #22
                I'm trying to fix an issue where someone updates the case of a field that has a unique validator on it.

                The unique check fails when they try and modify the case of the existing record.

                Eg, changing

                isomorphic to Isomorphic would fail the is unique check. Even though you are updating the record instead of adding one.

                Comment

                Working...
                X