Announcement

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

    Minor bug: cacheSync & normal fetch request binary-field data although it isn't sent

    Hi Isomorphic,

    please see the following docs:
    Originally posted by Docs
    Binary fields and normal "fetch"
    For an ordinary "fetch" operation, it's generally useless to return data for a binary field, because in most cases code running in the browser would not be able to do anything with a binary value (such as invoke a PDF viewing plugin). For this reason the Smart GWT Server will automatically omit values of type InputStream, byte[] or Blob during a normal "fetch".
    I have this .ds.xml:
    Code:
    <DataSource dbName="Oracle" tableName="T_ATTACHMENT" ID="T_ATTACHMENT" serverType="sql"
        serverConstructor="com.lmscompany.lms.server.LMSSQLDataSource" allowedClientOperationTypes="add fetch remove validate viewFile downloadFile">
        <fields>
            <field primaryKey="true" hidden="true" name="ID" type="sequence" />
            <field hidden="true" name="TENANT_ID" type="integer" canEdit="false" />
            
            <field foreignKey="V_USER_CREATED_BY.ID" relatedTableAlias="USER_CREATED_BY" name="CREATED_BY" title="Hinzugefügt von" type="creator" />
            <field name="CREATED_BY_NAME" includeFrom="V_USER_CREATED_BY.FULLNAME_INITIALS_GIVENNAME" length="61" hidden="true" />
            <field name="CREATED_BY_NAME_TOOLTIP" includeFrom="V_USER_CREATED_BY.FULLNAME_LEGALENTITYNAME" length="124" hidden="true" />
            
            <field name="CREATED_AT" title="Hinzugefügt am" type="creatorTimestamp" />
            
            <field foreignKey="V_USER_MODIFIED_BY.ID" relatedTableAlias="USER_MODIFIED_BY" name="MODIFIED_BY" title="Geändert von" type="modifier" />
            <field name="MODIFIED_BY_NAME" includeFrom="V_USER_MODIFIED_BY.FULLNAME_INITIALS_GIVENNAME" length="61" hidden="true" />
            <field name="MODIFIED_BY_NAME_TOOLTIP" includeFrom="V_USER_MODIFIED_BY.FULLNAME_LEGALENTITYNAME" length="124" hidden="true" />
            
            <field name="MODIFIED_AT" title="Geändert am" type="modifierTimestamp" />
            
            <field name="TITLE" title="Titel" type="text" length="100" required="true" />
            <field name="LEAD_ID" type="integer" hidden="true" />
            <field name="DETAIL_ID" type="integer" hidden="true" />
            <field name="DATA" title="Datei" type="binary" required="true" maxFileSize="2097152" />
            <field name="DATA_FILENAME" length="255" type="text" hidden="true" required="true" />
            <field name="DATA_FILESIZE" title="Dateigröße" type="integer" required="true" />
            <field name="DATA_DATE_CREATED" title="Hinzugefügt am" type="datetime" required="true" />
    
            <!-- TENANT_IDs for WHERE-clause generation -->
            <field name="CREATED_BY_TENANT_ID" includeFrom="V_USER_CREATED_BY.TENANT_ID" hidden="true" />
            <field name="MODIFIED_BY_TENANT_ID" includeFrom="V_USER_MODIFIED_BY.TENANT_ID" hidden="true" />
        </fields>
        <serverObject lookupStyle="new" className="com.lmscompany.lms.server.worker.T_ATTACHMENT" />
        <operationBindings>
            <operationBinding operationType="viewFile" />
            <operationBinding operationType="downloadFile" />
        </operationBindings>
    </DataSource>
    This is what is generated for an add-operation followed by a client side ListGrid-fetch:
    Code:
    === 2015-09-08 14:04:44,606 [-262] DEBUG RPCManager - Processing 1 requests.
    === 2015-09-08 14:04:44,611 [-262] INFO  DSRequest - We parsed 1 uploaded file(s): "TESTFILE.RAR" (1204100 bytes)
    === 2015-09-08 14:04:44,612 [-262] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        values:{
            _transaction:null,
            DATA:"TESTFILE.RAR",
            LEAD_ID:875,
            TITLE:"aaa",
            DATA_DATE_CREATED:new Date(1441713884611),
            DATA_FILESIZE:1204100,
            DATA_FILENAME:"TESTFILE.RAR"
        },
        operationConfig:{
            dataSource:"T_ATTACHMENT",
            repo:null,
            operationType:"add",
            textMatchStyle:"exact"
        },
        componentId:"isc_DynamicForm_3",
        appID:"builtinApplication",
        operation:"T_ATTACHMENT_add",
        oldValues:{
        },
        criteria:{
        }
    }
    === 2015-09-08 14:04:44,612 [-262] INFO  LMSIDACall - Performing 1 operation(s)
    === 2015-09-08 14:04:44,621 [-262] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_add] No userTypes defined, allowing anyone access to all operations for this application
    === 2015-09-08 14:04:44,621 [-262] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_add] No public zero-argument method named '_T_ATTACHMENT_add' found, performing generic datasource operation
    === 2015-09-08 14:04:44,623 [-262] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_add] Performing add operation with
        criteria: {_transaction:null,LEAD_ID:875,TITLE:"aaa",DATA_DATE_CREATED:new Date(1441713884611),DATA_FILESIZE:1204100,DATA_FILENAME:"TESTFILE.RAR",CREATED_BY:"1083",CREATED_AT:new Date(1441713884618),MODIFIED_BY:"1083",MODIFIED_AT:new Date(1441713884618)}    values: {_transaction:null,LEAD_ID:875,TITLE:"aaa",DATA_DATE_CREATED:new Date(1441713884611),DATA_FILESIZE:1204100,DATA_FILENAME:"TESTFILE.RAR",CREATED_BY:"1083",CREATED_AT:new Date(1441713884618),MODIFIED_BY:"1083",MODIFIED_AT:new Date(1441713884618),TENANT_ID:1}
    === 2015-09-08 14:04:44,623 [-262] INFO  SQLValuesClause - [builtinApplication.T_ATTACHMENT_add] Ignored data for non-existent or included columns: [_transaction]
    === 2015-09-08 14:04:44,623 [-262] DEBUG SQLValuesClause - [builtinApplication.T_ATTACHMENT_add] Sequences: {ID=__default}
    === 2015-09-08 14:04:44,626 [-262] DEBUG SQLConnectionManager - [builtinApplication.T_ATTACHMENT_add] Borrowed connection '352375745'
    === 2015-09-08 14:04:44,626 [-262] DEBUG SQLTransaction - [builtinApplication.T_ATTACHMENT_add] Started new Oracle transaction "352375745"
    === 2015-09-08 14:04:44,626 [-262] DEBUG SQLDriver - [builtinApplication.T_ATTACHMENT_add] About to execute SQL update in 'Oracle' using connection'352375745'
    === 2015-09-08 14:04:44,626 [-262] INFO  SQLDriver - [builtinApplication.T_ATTACHMENT_add] Executing SQL update on 'Oracle': INSERT INTO T_ATTACHMENT (CREATED_AT, CREATED_BY, DATA, DATA_DATE_CREATED, DATA_FILENAME, DATA_FILESIZE, LEAD_ID, MODIFIED_AT, MODIFIED_BY, TENANT_ID, TITLE, ID) VALUES (TO_DATE('2015-09-08 14:04:44','YYYY-MM-DD HH24:MI:SS'), '1083', ?, TO_DATE('2015-09-08 14:04:44','YYYY-MM-DD HH24:MI:SS'), 'TESTFILE.RAR', 1204100, 875, TO_DATE('2015-09-08 14:04:44','YYYY-MM-DD HH24:MI:SS'), '1083', 1, 'aaa', T_ATTACHMENT_ID.NextVal)
    === 2015-09-08 14:04:44,671 [-262] DEBUG SQLDriver - [builtinApplication.T_ATTACHMENT_add] SequenceMode is not JDBC_DRIVER, skipping search for generated values
    === 2015-09-08 14:04:44,672 [-262] DEBUG SQLDataSource - [builtinApplication.T_ATTACHMENT_add] add operation affected 1 rows
    === 2015-09-08 14:04:44,672 [-262] DEBUG SQLDriver - [builtinApplication.T_ATTACHMENT_add] About to execute SQL query in 'Oracle' using connection '352375745'
    === 2015-09-08 14:04:44,672 [-262] INFO  SQLDriver - [builtinApplication.T_ATTACHMENT_add] Executing SQL query on 'Oracle': SELECT T_ATTACHMENT_ID.CurrVal FROM DUAL
    === 2015-09-08 14:04:44,674 [-262] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_add] primaryKeys: {ID=3}
    === 2015-09-08 14:04:44,683 [-262] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
    === 2015-09-08 14:04:44,683 [-262] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
    === 2015-09-08 14:04:44,685 [-262] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] Performing fetch operation with
        criteria: {criteria:[{value:"3",fieldName:"ID",operator:"iEquals"},{value:1,fieldName:"TENANT_ID",operator:"equals"},{value:1,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:1,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"}    values: {criteria:[{value:"3",fieldName:"ID",operator:"iEquals"},{value:1,fieldName:"TENANT_ID",operator:"equals"},{value:1,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:1,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"}
    === 2015-09-08 14:04:44,687 [-262] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause
    === 2015-09-08 14:04:44,688 [-262] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] 1319: Executing SQL query on 'Oracle': SELECT T_ATTACHMENT.ID, T_ATTACHMENT.TENANT_ID, T_ATTACHMENT.CREATED_BY, T_ATTACHMENT.CREATED_AT, T_ATTACHMENT.MODIFIED_BY, T_ATTACHMENT.MODIFIED_AT, T_ATTACHMENT.TITLE, T_ATTACHMENT.LEAD_ID, T_ATTACHMENT.DETAIL_ID, T_ATTACHMENT.DATA, T_ATTACHMENT.DATA_FILENAME, T_ATTACHMENT.DATA_FILESIZE, T_ATTACHMENT.DATA_DATE_CREATED, USER_CREATED_BY.FULLNAME_INITIALS_GIVENNAME AS CREATED_BY_NAME, USER_CREATED_BY.FULLNAME_LEGALENTITYNAME AS CREATED_BY_NAME_TOOLTIP, USER_MODIFIED_BY.FULLNAME_INITIALS_GIVENNAME AS MODIFIED_BY_NAME, USER_MODIFIED_BY.FULLNAME_LEGALENTITYNAME AS MODIFIED_BY_NAME_TOOLTIP, USER_CREATED_BY.TENANT_ID AS CREATED_BY_TENANT_ID, USER_MODIFIED_BY.TENANT_ID AS MODIFIED_BY_TENANT_ID FROM T_ATTACHMENT JOIN MV_USER_DATA USER_CREATED_BY ON T_ATTACHMENT.CREATED_BY = USER_CREATED_BY.ID JOIN MV_USER_DATA USER_MODIFIED_BY ON T_ATTACHMENT.MODIFIED_BY = USER_MODIFIED_BY.ID WHERE ((LOWER(T_ATTACHMENT.ID) = LOWER('3') AND T_ATTACHMENT.ID IS NOT NULL) AND (T_ATTACHMENT.TENANT_ID = 1 AND T_ATTACHMENT.TENANT_ID IS NOT NULL) AND (USER_CREATED_BY.TENANT_ID = 1 AND USER_CREATED_BY.TENANT_ID IS NOT NULL) AND (USER_MODIFIED_BY.TENANT_ID = 1 AND USER_MODIFIED_BY.TENANT_ID IS NOT NULL))
    === 2015-09-08 14:04:44,688 [-262] DEBUG SQLDriver - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] About to execute SQL query in 'Oracle' using connection '352375745'
    === 2015-09-08 14:04:44,688 [-262] INFO  SQLDriver - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] Executing SQL query on 'Oracle': SELECT T_ATTACHMENT.ID, T_ATTACHMENT.TENANT_ID, T_ATTACHMENT.CREATED_BY, T_ATTACHMENT.CREATED_AT, T_ATTACHMENT.MODIFIED_BY, T_ATTACHMENT.MODIFIED_AT, T_ATTACHMENT.TITLE, T_ATTACHMENT.LEAD_ID, T_ATTACHMENT.DETAIL_ID, T_ATTACHMENT.DATA, T_ATTACHMENT.DATA_FILENAME, T_ATTACHMENT.DATA_FILESIZE, T_ATTACHMENT.DATA_DATE_CREATED, USER_CREATED_BY.FULLNAME_INITIALS_GIVENNAME AS CREATED_BY_NAME, USER_CREATED_BY.FULLNAME_LEGALENTITYNAME AS CREATED_BY_NAME_TOOLTIP, USER_MODIFIED_BY.FULLNAME_INITIALS_GIVENNAME AS MODIFIED_BY_NAME, USER_MODIFIED_BY.FULLNAME_LEGALENTITYNAME AS MODIFIED_BY_NAME_TOOLTIP, USER_CREATED_BY.TENANT_ID AS CREATED_BY_TENANT_ID, USER_MODIFIED_BY.TENANT_ID AS MODIFIED_BY_TENANT_ID FROM T_ATTACHMENT JOIN MV_USER_DATA USER_CREATED_BY ON T_ATTACHMENT.CREATED_BY = USER_CREATED_BY.ID JOIN MV_USER_DATA USER_MODIFIED_BY ON T_ATTACHMENT.MODIFIED_BY = USER_MODIFIED_BY.ID WHERE ((LOWER(T_ATTACHMENT.ID) = LOWER('3') AND T_ATTACHMENT.ID IS NOT NULL) AND (T_ATTACHMENT.TENANT_ID = 1 AND T_ATTACHMENT.TENANT_ID IS NOT NULL) AND (USER_CREATED_BY.TENANT_ID = 1 AND USER_CREATED_BY.TENANT_ID IS NOT NULL) AND (USER_MODIFIED_BY.TENANT_ID = 1 AND USER_MODIFIED_BY.TENANT_ID IS NOT NULL))
    === 2015-09-08 14:04:44,693 [-262] INFO  DSResponse - [builtinApplication.T_ATTACHMENT_add, builtinApplication.null] DSResponse: List with 1 items
    === 2015-09-08 14:04:44,694 [-262] INFO  DSResponse - [builtinApplication.T_ATTACHMENT_add] DSResponse: List with 1 items
    === 2015-09-08 14:04:44,695 [-262] DEBUG RPCManager - Content type for RPC transaction: text/html; charset=UTF-8
    === 2015-09-08 14:04:44,695 [-262] DEBUG SQLTransaction - Committing Oracle transaction "352375745"
    === 2015-09-08 14:04:44,696 [-262] DEBUG RPCManager - DMI response, dropExtraFields: true
    === 2015-09-08 14:04:44,697 [-262] DEBUG SQLTransaction - getConnection() found transactional connection for Oracle with hashcode "352375745"
    === 2015-09-08 14:04:44,697 [-262] DEBUG SQLTransaction - Ending Oracle transaction "352375745"
    === 2015-09-08 14:04:44,697 [-262] DEBUG SQLConnectionManager - About to close connection with hashcode "352375745"
    === 2015-09-08 14:04:44,699 [-262] INFO  Compression - /lms/lms/sc/IDACall: 1171 -> 628 bytes
    2015-09-08 14:04:45,914 [http-bio-8080-exec-265] DEBUG org.apache.catalina.authenticator.FormAuthenticator- Already authenticated 'csuperuser'
    === 2015-09-08 14:04:45,915 [-265] INFO  RequestContext - URL: '/lms/lms/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0': Moz (Gecko) with Accept-Encoding header
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: host:localhost:8080
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: accept-language:de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: accept-encoding:gzip, deflate
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: dnt:1
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded; charset=UTF-8
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: referer:http://localhost:8080/lms/
    === 2015-09-08 14:04:45,915 [-265] DEBUG LMSIDACall - Header Name:Value pair: content-length:1457
    === 2015-09-08 14:04:45,916 [-265] DEBUG LMSIDACall - Header Name:Value pair: cookie:JSESSIONID=58D5BCB87B39BF43F5BB3A66AD7B50FC; isc_cState=ready; GLog=%7B%0D%20%20%20%20trackRPC%3Atrue%2C%20%0D%20%20%20%20isc_pageURL%3A%22http%3A//localhost%3A8080/lms/%22%2C%20%0D%20%20%20%20isc_pageGUID%3A%2249D54489-C2F6-466B-A644-20D2F2099234%22%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20sgwtInternal%3A1%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20left%3A0%2C%20%0D%20%20%20%20top%3A0%2C%20%0D%20%20%20%20width%3A1251%2C%20%0D%20%20%20%20height%3A773%0D%7D
    === 2015-09-08 14:04:45,916 [-265] DEBUG LMSIDACall - Header Name:Value pair: connection:keep-alive
    === 2015-09-08 14:04:45,916 [-265] DEBUG LMSIDACall - Header Name:Value pair: pragma:no-cache
    === 2015-09-08 14:04:45,916 [-265] DEBUG LMSIDACall - Header Name:Value pair: cache-control:no-cache
    === 2015-09-08 14:04:45,916 [-265] DEBUG LMSIDACall - session exists: 58D5BCB87B39BF43F5BB3A66AD7B50FC
    === 2015-09-08 14:04:45,916 [-265] DEBUG LMSIDACall - remote user: csuperuser
    === 2015-09-08 14:04:45,922 [-265] DEBUG RPCManager - Processing 1 requests.
    === 2015-09-08 14:04:45,923 [-265] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            fieldName:"LEAD_ID",
            operator:"equals",
            value:875,
            _constructor:"AdvancedCriteria"
        },
        operationConfig:{
            dataSource:"T_ATTACHMENT",
            repo:null,
            operationType:"fetch",
            textMatchStyle:"exact"
        },
        startRow:0,
        endRow:75,
        componentId:"isc_AddEditLeadAttatchments_6_0",
        appID:"builtinApplication",
        operation:"T_ATTACHMENT_fetch",
        oldValues:{
            fieldName:"LEAD_ID",
            operator:"equals",
            value:875,
            _constructor:"AdvancedCriteria"
        }
    }
    === 2015-09-08 14:04:45,923 [-265] INFO  LMSIDACall - Performing 1 operation(s)
    === 2015-09-08 14:04:45,931 [-265] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_fetch] No userTypes defined, allowing anyone access to all operations for this application
    === 2015-09-08 14:04:45,931 [-265] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_fetch] No public zero-argument method named '_T_ATTACHMENT_fetch' found, performing generic datasource operation
    === 2015-09-08 14:04:45,932 [-265] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_fetch] Performing fetch operation with
        criteria: {criteria:[{value:1,fieldName:"TENANT_ID",operator:"equals"},{value:875,fieldName:"LEAD_ID",operator:"equals"},{value:1,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:1,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"}    values: {criteria:[{value:1,fieldName:"TENANT_ID",operator:"equals"},{value:875,fieldName:"LEAD_ID",operator:"equals"},{value:1,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:1,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"}
    === 2015-09-08 14:04:45,934 [-265] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause
    === 2015-09-08 14:04:45,934 [-265] DEBUG temp - [builtinApplication.T_ATTACHMENT_fetch] operationBinding config not found for operationType='fetch' and operationId='T_ATTACHMENT_fetch'
    === 2015-09-08 14:04:45,935 [-265] DEBUG temp - [builtinApplication.T_ATTACHMENT_fetch] Row count query will be used.
    === 2015-09-08 14:04:45,935 [-265] DEBUG SQLDataSource - [builtinApplication.T_ATTACHMENT_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause
    === 2015-09-08 14:04:45,936 [-265] DEBUG SQLDataSource - [builtinApplication.T_ATTACHMENT_fetch] Eval'd row count query: SELECT COUNT(*) FROM T_ATTACHMENT JOIN MV_USER_DATA USER_CREATED_BY ON T_ATTACHMENT.CREATED_BY = USER_CREATED_BY.ID JOIN MV_USER_DATA USER_MODIFIED_BY ON T_ATTACHMENT.MODIFIED_BY = USER_MODIFIED_BY.ID WHERE ((T_ATTACHMENT.TENANT_ID = 1 AND T_ATTACHMENT.TENANT_ID IS NOT NULL) AND (T_ATTACHMENT.LEAD_ID = 875 AND T_ATTACHMENT.LEAD_ID IS NOT NULL) AND (USER_CREATED_BY.TENANT_ID = 1 AND USER_CREATED_BY.TENANT_ID IS NOT NULL) AND (USER_MODIFIED_BY.TENANT_ID = 1 AND USER_MODIFIED_BY.TENANT_ID IS NOT NULL))
    === 2015-09-08 14:04:45,937 [-265] DEBUG SQLConnectionManager - [builtinApplication.T_ATTACHMENT_fetch] Borrowed connection '352375745'
    === 2015-09-08 14:04:45,938 [-265] DEBUG SQLTransaction - [builtinApplication.T_ATTACHMENT_fetch] Started new Oracle transaction "352375745"
    === 2015-09-08 14:04:45,938 [-265] DEBUG SQLDriver - [builtinApplication.T_ATTACHMENT_fetch] About to execute SQL query in 'Oracle' using connection '352375745'
    === 2015-09-08 14:04:45,938 [-265] INFO  SQLDriver - [builtinApplication.T_ATTACHMENT_fetch] Executing SQL query on 'Oracle': SELECT COUNT(*) FROM T_ATTACHMENT JOIN MV_USER_DATA USER_CREATED_BY ON T_ATTACHMENT.CREATED_BY = USER_CREATED_BY.ID JOIN MV_USER_DATA USER_MODIFIED_BY ON T_ATTACHMENT.MODIFIED_BY = USER_MODIFIED_BY.ID WHERE ((T_ATTACHMENT.TENANT_ID = 1 AND T_ATTACHMENT.TENANT_ID IS NOT NULL) AND (T_ATTACHMENT.LEAD_ID = 875 AND T_ATTACHMENT.LEAD_ID IS NOT NULL) AND (USER_CREATED_BY.TENANT_ID = 1 AND USER_CREATED_BY.TENANT_ID IS NOT NULL) AND (USER_MODIFIED_BY.TENANT_ID = 1 AND USER_MODIFIED_BY.TENANT_ID IS NOT NULL))
    === 2015-09-08 14:04:45,940 [-265] DEBUG SQLDataSource - [builtinApplication.T_ATTACHMENT_fetch] JDBC driver windowed select rows 0->75, result size 75. Query: SELECT T_ATTACHMENT.ID, T_ATTACHMENT.TENANT_ID, T_ATTACHMENT.CREATED_BY, T_ATTACHMENT.CREATED_AT, T_ATTACHMENT.MODIFIED_BY, T_ATTACHMENT.MODIFIED_AT, T_ATTACHMENT.TITLE, T_ATTACHMENT.LEAD_ID, T_ATTACHMENT.DETAIL_ID, T_ATTACHMENT.DATA, T_ATTACHMENT.DATA_FILENAME, T_ATTACHMENT.DATA_FILESIZE, T_ATTACHMENT.DATA_DATE_CREATED, USER_CREATED_BY.FULLNAME_INITIALS_GIVENNAME AS CREATED_BY_NAME, USER_CREATED_BY.FULLNAME_LEGALENTITYNAME AS CREATED_BY_NAME_TOOLTIP, USER_MODIFIED_BY.FULLNAME_INITIALS_GIVENNAME AS MODIFIED_BY_NAME, USER_MODIFIED_BY.FULLNAME_LEGALENTITYNAME AS MODIFIED_BY_NAME_TOOLTIP, USER_CREATED_BY.TENANT_ID AS CREATED_BY_TENANT_ID, USER_MODIFIED_BY.TENANT_ID AS MODIFIED_BY_TENANT_ID FROM T_ATTACHMENT JOIN MV_USER_DATA USER_CREATED_BY ON T_ATTACHMENT.CREATED_BY = USER_CREATED_BY.ID JOIN MV_USER_DATA USER_MODIFIED_BY ON T_ATTACHMENT.MODIFIED_BY = USER_MODIFIED_BY.ID WHERE ((T_ATTACHMENT.TENANT_ID = 1 AND T_ATTACHMENT.TENANT_ID IS NOT NULL) AND (T_ATTACHMENT.LEAD_ID = 875 AND T_ATTACHMENT.LEAD_ID IS NOT NULL) AND (USER_CREATED_BY.TENANT_ID = 1 AND USER_CREATED_BY.TENANT_ID IS NOT NULL) AND (USER_MODIFIED_BY.TENANT_ID = 1 AND USER_MODIFIED_BY.TENANT_ID IS NOT NULL))
    === 2015-09-08 14:04:45,944 [-265] DEBUG SQLDataSource - [builtinApplication.T_ATTACHMENT_fetch] Using paging strategy 'jdbcScroll' - scrolling to absolute position 1
    === 2015-09-08 14:04:45,944 [-265] DEBUG SQLDataSource - [builtinApplication.T_ATTACHMENT_fetch] Scrolling / positioning took 0ms
    === 2015-09-08 14:04:45,947 [-265] INFO  DSResponse - [builtinApplication.T_ATTACHMENT_fetch] DSResponse: List with 3 items
    === 2015-09-08 14:04:45,948 [-265] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
    === 2015-09-08 14:04:45,948 [-265] DEBUG SQLTransaction - Committing Oracle transaction "352375745"
    === 2015-09-08 14:04:45,949 [-265] DEBUG RPCManager - DMI response, dropExtraFields: true
    === 2015-09-08 14:04:45,950 [-265] DEBUG SQLTransaction - getConnection() found transactional connection for Oracle with hashcode "352375745"
    === 2015-09-08 14:04:45,950 [-265] DEBUG SQLTransaction - Ending Oracle transaction "352375745"
    === 2015-09-08 14:04:45,950 [-265] DEBUG SQLConnectionManager - About to close connection with hashcode "352375745"
    === 2015-09-08 14:04:45,954 [-265] INFO  Compression - /lms/lms/sc/IDACall: 1697 -> 457 bytes
    Search the page for "T_ATTACHMENT.DATA," to see that it is included in two SELECT statements.
    Depending on the filesize this will create much unneeded IO/network traffic between the webserver and the database.
    I'm using v10.0p_2015-08-24/PowerEdition Deployment.

    Best regards
    Blama

    #2
    Just a quick note to reassure you this is being looked at.
    We'll follow up when we have this resolved.

    Regards
    Isomorphic Software

    Comment


      #3
      Sorry for the delay, this is fixed now and will be available in the next (2015-10-08) nightly build.

      Comment


        #4
        Hi Isomorphic,

        your fix also disabled normal view/download operations because the data column is no longer in the SELECT-list - see the log and especially the bold parts. Currently the binary field function is unusable! Tested using v10.0p_2015-10-08/PowerEdition Deployment.

        Code:
        === 2015-10-14 02:19:53,518 [c-14] DEBUG RPCManager - Request #1 (DSRequest) payload: {
            criteria:{
                ID:15,
                download_fieldname:"DATA",
                download_filename:"Testdata.csv"
            },
            operationConfig:{
                dataSource:"T_ATTACHMENT",
                repo:null,
                operationType:"downloadFile",
                textMatchStyle:"exact"
            },
            appID:"builtinApplication",
            operation:"T_ATTACHMENT_downloadFile",
            oldValues:{
                ID:15,
                download_fieldname:"DATA",
                download_filename:"Testdata.csv"
            }
        }
        === 2015-10-14 02:19:53,518 [c-14] INFO  LMSIDACall - Performing 1 operation(s)
        === 2015-10-14 02:19:53,518 [c-14] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_downloadFile] No userTypes defined, allowing anyone access to all operations for this application
        === 2015-10-14 02:19:53,518 [c-14] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_downloadFile] No public zero-argument method named '_T_ATTACHMENT_downloadFile' found, performing generic datasource operation
        === 2015-10-14 02:19:53,520 [c-14] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
        === 2015-10-14 02:19:53,520 [c-14] DEBUG AppBase - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
        === 2015-10-14 02:19:53,520 [c-14] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] Performing fetch operation with
            criteria: {criteria:[{value:15,fieldName:"ID",operator:"equals"},{value:"DATA",fieldName:"download_fieldname",operator:"iEquals"},{value:"Testdata.csv",fieldName:"download_filename",operator:"iEquals"},{value:15,fieldName:"TENANT_ID",operator:"equals"},{value:15,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:15,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"}    values: {criteria:[{value:15,fieldName:"ID",operator:"equals"},{value:"DATA",fieldName:"download_fieldname",operator:"iEquals"},{value:"Testdata.csv",fieldName:"download_filename",operator:"iEquals"},{value:15,fieldName:"TENANT_ID",operator:"equals"},{value:15,fieldName:"CREATED_BY_TENANT_ID",operator:"equals"},{value:15,fieldName:"MODIFIED_BY_TENANT_ID",operator:"equals"}],operator:"and",_constructor:"AdvancedCriteria"}
        === 2015-10-14 02:19:53,520 [c-14] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE $defaultWhereClause
        === 2015-10-14 02:19:53,521 [c-14] INFO  SQLDataSource - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] 29: Executing SQL query on 'Oracle': SELECT T_ATTACHMENT.ID, T_ATTACHMENT.TENANT_ID, T_ATTACHMENT.CREATED_BY, T_ATTACHMENT.CREATED_AT, T_ATTACHMENT.MODIFIED_BY, T_ATTACHMENT.MODIFIED_AT, T_ATTACHMENT.TITLE, T_ATTACHMENT.LEAD_ID, T_ATTACHMENT.DETAIL_ID, T_ATTACHMENT.DATA_FILENAME, T_ATTACHMENT.DATA_FILESIZE, USER_CREATED_BY.FULLNAME_INITIALS_GIVENNAME AS CREATED_BY_NAME, USER_CREATED_BY.FULLNAME_LEGALENTITYNAME AS CREATED_BY_NAME_TOOLTIP, USER_MODIFIED_BY.FULLNAME_INITIALS_GIVENNAME AS MODIFIED_BY_NAME, USER_MODIFIED_BY.FULLNAME_LEGALENTITYNAME AS MODIFIED_BY_NAME_TOOLTIP, USER_CREATED_BY.TENANT_ID AS CREATED_BY_TENANT_ID, USER_MODIFIED_BY.TENANT_ID AS MODIFIED_BY_TENANT_ID FROM T_ATTACHMENT JOIN MV_USER_DATA USER_CREATED_BY ON T_ATTACHMENT.CREATED_BY = USER_CREATED_BY.ID JOIN MV_USER_DATA USER_MODIFIED_BY ON T_ATTACHMENT.MODIFIED_BY = USER_MODIFIED_BY.ID WHERE ((T_ATTACHMENT.ID = 15 AND T_ATTACHMENT.ID IS NOT NULL) AND '1'='1' AND '1'='1' AND (T_ATTACHMENT.TENANT_ID = 15 AND T_ATTACHMENT.TENANT_ID IS NOT NULL) AND (USER_CREATED_BY.TENANT_ID = 15 AND USER_CREATED_BY.TENANT_ID IS NOT NULL) AND (USER_MODIFIED_BY.TENANT_ID = 15 AND USER_MODIFIED_BY.TENANT_ID IS NOT NULL))
        === 2015-10-14 02:19:53,521 [c-14] DEBUG SQLConnectionManager - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] Borrowed connection '1900167388'
        === 2015-10-14 02:19:53,521 [c-14] DEBUG SQLTransaction - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] Started new Oracle transaction "1900167388"
        === 2015-10-14 02:19:53,521 [c-14] DEBUG SQLDriver - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] About to execute SQL query in 'Oracle' using connection '1900167388'
        === 2015-10-14 02:19:53,521 [c-14] INFO  SQLDriver - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] Executing SQL query on 'Oracle': SELECT T_ATTACHMENT.ID, T_ATTACHMENT.TENANT_ID, T_ATTACHMENT.CREATED_BY, T_ATTACHMENT.CREATED_AT, T_ATTACHMENT.MODIFIED_BY, T_ATTACHMENT.MODIFIED_AT, T_ATTACHMENT.TITLE, T_ATTACHMENT.LEAD_ID, T_ATTACHMENT.DETAIL_ID, T_ATTACHMENT.DATA_FILENAME, T_ATTACHMENT.DATA_FILESIZE, USER_CREATED_BY.FULLNAME_INITIALS_GIVENNAME AS CREATED_BY_NAME, USER_CREATED_BY.FULLNAME_LEGALENTITYNAME AS CREATED_BY_NAME_TOOLTIP, USER_MODIFIED_BY.FULLNAME_INITIALS_GIVENNAME AS MODIFIED_BY_NAME, USER_MODIFIED_BY.FULLNAME_LEGALENTITYNAME AS MODIFIED_BY_NAME_TOOLTIP, USER_CREATED_BY.TENANT_ID AS CREATED_BY_TENANT_ID, USER_MODIFIED_BY.TENANT_ID AS MODIFIED_BY_TENANT_ID FROM T_ATTACHMENT JOIN MV_USER_DATA USER_CREATED_BY ON T_ATTACHMENT.CREATED_BY = USER_CREATED_BY.ID JOIN MV_USER_DATA USER_MODIFIED_BY ON T_ATTACHMENT.MODIFIED_BY = USER_MODIFIED_BY.ID WHERE ((T_ATTACHMENT.ID = 15 AND T_ATTACHMENT.ID IS NOT NULL) AND '1'='1' AND '1'='1' AND (T_ATTACHMENT.TENANT_ID = 15 AND T_ATTACHMENT.TENANT_ID IS NOT NULL) AND (USER_CREATED_BY.TENANT_ID = 15 AND USER_CREATED_BY.TENANT_ID IS NOT NULL) AND (USER_MODIFIED_BY.TENANT_ID = 15 AND USER_MODIFIED_BY.TENANT_ID IS NOT NULL))
        === 2015-10-14 02:19:53,522 [c-14] INFO  DSResponse - [builtinApplication.T_ATTACHMENT_downloadFile, builtinApplication.null] DSResponse: List with 1 items
        === 2015-10-14 02:19:53,522 [c-14] INFO  DSResponse - [builtinApplication.T_ATTACHMENT_downloadFile] DSResponse: Map with 16 keys
        [B]=== 2015-10-14 02:19:53,522 [c-14] WARN  RPCManager - dsResponse.getData().get("DATA") returned null when we were expecting an InputStream, Byte[] or byte[]. Can't continue.[/B]
        === 2015-10-14 02:19:53,522 [c-14] DEBUG SQLTransaction - getConnection() found transactional connection for Oracle with hashcode "1900167388"
        === 2015-10-14 02:19:53,522 [c-14] DEBUG SQLTransaction - Ending Oracle transaction "1900167388"
        === 2015-10-14 02:19:53,522 [c-14] DEBUG SQLConnectionManager - About to close connection with hashcode "1900167388"
        === 2015-10-14 02:19:53,523 [c-14] DEBUG SQLTransaction - getConnection() found transactional connection for Oracle (connection is null)
        This is an important one for me.

        Best regards
        Blama

        Comment


          #5
          Apologies, this is fixed now and will be available for download in the next (2015-10-16) nightly build. Please let us know how it worked for you.

          Comment


            #6
            Hi Isomorphic,

            this is working as expected, thank you.

            Best regards
            Blama

            Comment

            Working...
            X