Announcement

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

    [bug] 9.0 - resthandler getCriteriaValue returns string for a boolean field

    SmartClient Version: v9.0p_2013-07-16/EVAL Deployment (expires 2013.09.14_09.07.29)
    and
    SmartClient Version: v8.3p_2013-07-07/PowerEdition Deployment (built 2013-07-07)
    (we're in the process of migrating to 9.0, so we're really interested in the fix for 9.0 only)

    using RESTHandler, when doing a fetch with a boolean field in the criteria, I noticed that the where clause wasn't matching with the passed boolean value. Actually, dsRequest.getCriteriaValue returns the "true" string, while getFieldValue returns true as a Boolean.

    As you can see in the server side logs, the IS_SOLD_OUT field has true value, but in the where clause IS_SOLD_OUT='F'

    IS_SOLD_OUT is defined as:
    Code:
            <field name="IS_SOLD_OUT" type="boolean" sqlStorageStrategy="singleCharTF" sqlType="varchar" sqlLength="1"/>
    Code:
    2013-07-17 11:53:42,496 INFO  RequestContext URL: '/Legend/isomorphic/RESTHandler', User-Agent: 'Jakarta Commons-HttpClient/3.1': Unsupported WITHOUT Accept-Encoding header 
    2013-07-17 11:53:42,497 DEBUG FilterChainProxy Converted URL to lowercase, from: '/isomorphic/resthandler'; to: '/isomorphic/resthandler' 
    2013-07-17 11:53:42,497 DEBUG FilterChainProxy Candidate is: '/isomorphic/resthandler'; pattern is /images/*; matched=false 
    2013-07-17 11:53:42,497 DEBUG FilterChainProxy Converted URL to lowercase, from: '/isomorphic/resthandler'; to: '/isomorphic/resthandler' 
    2013-07-17 11:53:42,497 DEBUG FilterChainProxy Candidate is: '/isomorphic/resthandler'; pattern is /isomorphic/resthandler*; matched=true 
    2013-07-17 11:53:42,497 DEBUG FilterChainProxy /isomorphic/RESTHandler has an empty filter list 
    2013-07-17 11:53:42,498 DEBUG RestRequestParser Parsing json object: '{    "transaction": {        "operations": [            {                "dataSource": "JPC_LISTINI",                "operationType": "fetch",                "startRow": 0,                "endRow": 10,                "data": {                    "IS_SOLD_OUT": true,                    "ID_FASCIA_PREZZO_LEG_FK": 1                }            }        ]    }}' 
    2013-07-17 11:53:42,502 DEBUG HttpSessionEventPublisher Publishing event: org.springframework.security.web.session.HttpSessionCreatedEvent[source=org.apache.catalina.session.StandardSessionFacade@3d903b5a] 
    2013-07-17 11:53:42,504 INFO  LegendRestHandler Performing 1 operation(s) 
    2013-07-17 11:53:42,511 INFO  SQLDriver [builtinApplication.JPC_LISTINI_fetch] Executing SQL query on 'dbJpcEP': SELECT COUNT(*) FROM DBSALES.JPC_STAGIONI, DBSALES.JPC_LISTINI WHERE 
                    (JPC_LISTINI.IS_SOLD_OUT='F' AND JPC_LISTINI.ID_FASCIA_PREZZO_LEG_FK=1)
                    and JPC_LISTINI.TIPO_LISTINO = 'LEG'
                 AND JPC_LISTINI.ID_STAGIONI_FK = JPC_STAGIONI.ID_REC 
    2013-07-17 11:53:42,517 INFO  DSResponse [builtinApplication.JPC_LISTINI_fetch] DSResponse: List with 0 items 
    2013-07-17 11:53:42,517 DEBUG RPCManager Content type for RPC transaction: text/html; charset=UTF-8 
    2013-07-17 11:53:42,518 DEBUG RPCManager non-DMI response, dropExtraFields: false

    #2
    This was a problem specific to the combination of REST protocol and a sqlStorageStrategy of "singleCharXX". We've fixed it for 3.1, 4.0 and 4.1, fix will be in tomorrow's builds (dated July 19)

    Thanks for the error report

    Comment


      #3
      SmartClient Version: v9.0p_2013-07-20/EVAL Deployment

      verified, thank you very much.

      Comment

      Working...
      X