Announcement

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

    Strange generated SQL when fetching file in form

    Using: SmartClient12/SmartClient_v120p_2018-04-24_PowerEdition

    I have a slightly unusual database set up. I'm building an application that accesses 2 different databases on the same MySQL server. The current application needs to join to and pull a few fields from the people table of an older application. In order to be able to include fields across databases I've left driver.databaseName: blank in server.properties and then configured the tableName to include the database name in the ds.xml like: tableName="develPersonnel.people" . This seems to work with text fields but when I fetchData on a form that contains a single ViewFileItem field the generated SQL does not make sense. From the log exceprt below the initial dsRequest looks reasonable, but then a second dsRequest is sent with the wrong criteria.

    The Form:
    isc.DynamicForm.create({
    ID:"photoForm",
    autoDraw:false,
    dataSource:"people",
    numCols:1,
    canEdit:true,
    fields:[
    {
    name:"photo",
    autoDraw:false,
    showTitle:false,
    width:150,
    height:200,
    _constructor:"ViewFileItem"
    }
    ]
    });

    The fetchData call:
    photoForm.fetchData({isisEmplID:record.emplID});

    From the server log:

    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,465 [ec-1] INFO RequestContext - URL: '/devel/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36': Safari with Accept-Encoding header
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,474 [ec-1] DEBUG XML - Parsed XML from (in memory stream): 8ms
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,475 [ec-1] DEBUG RPCManager - Processing 1 requests.
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,475 [ec-1] DEBUG RPCManager - Request #1 (DSRequest) payload: {
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: criteria:{
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: isisEmplID:"0005123466"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: },
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: operationConfig:{
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: dataSource:"people",
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: repo:null,
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: operationType:"fetch",
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: textMatchStyle:"exact"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: },
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: componentId:"photoForm",
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: appID:"builtinApplication",
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: operation:"people_fetch",
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: oldValues:{
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: isisEmplID:"0005123466"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: }
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: }
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,475 [ec-1] INFO IDACall - Performing 1 operation(s)
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,475 [ec-1] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,475 [ec-1] DEBUG DeclarativeSecurity - DataSource people is not in the pre-checked list, processing...
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,475 [ec-1] DEBUG AppBase - [builtinApplication.people_fetch] No userTypes defined, allowing anyone access to all operations for this application
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,475 [ec-1] DEBUG AppBase - [builtinApplication.people_fetch] No public zero-argument method named '_people_fetch' found, performing generic datasource operation
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,476 [ec-1] INFO SQLDataSource - [builtinApplication.people_fetch] Performing fetch operation with
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: criteria: {} values: {}
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,476 [ec-1] INFO SQLWhereClause - [builtinApplication.people_fetch] empty condition
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,476 [ec-1] INFO SQLDataSource - [builtinApplication.people_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,477 [ec-1] DEBUG PoolableSQLConnectionFactory - [builtinApplication.people_fetch] Executing pingTest 'select 1 from dual' on connection 1371512807
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,477 [ec-1] INFO SQLDataSource - [builtinApplication.people_fetch] 649: Executing SQL query on 'gradrecord': SELECT develPersonnel.people.id_People, develPersonnel.people.creationName, develPersonnel.people.creationTimestamp, develPersonnel.people.modificationName, develPersonnel.people.modificationTimestamp, develPersonnel.people.nameLast, develPersonnel.people.nameFirst, develPersonnel.people.nameMiddle, develPersonnel.people.namePreferred, develPersonnel.people.nameInitials, develPersonnel.people.spouseName, develPersonnel.people.dateOfBirth, develPersonnel.people.gender, develPersonnel.people.payrollNotes, develPersonnel.people.includeInDirectory, develPersonnel.people.isGroupPI, develPersonnel.people.directoryType, develPersonnel.people.directoryTitle1, develPersonnel.people.directoryTitle2, develPersonnel.people.directoryTitle3, develPersonnel.people.emailAddress, develPersonnel.people.forwardingName, develPersonnel.people.forwardingAddress1, develPersonnel.people.forwardingAddress2, develPersonnel.people.forwardingCity, develPersonnel.people.forwardingState, develPersonnel.people.forwardingPostalCode, develPersonnel.people.forwardingCountry, develPersonnel.people.forwardingPhone, develPersonnel.people.forwardingModificationDate, develPersonnel.people.forwardingModificationName, develPersonnel.people.personNotes, develPersonnel.people.photo_filename, develPersonnel.people.photo_filesize, concat(people.nameLast,', ',people.nameFirst) AS lastFirst FROM develPersonnel.people WHERE ('1'='1')
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,478 [ec-1] DEBUG SQLConnectionManager - [builtinApplication.people_fetch] Borrowed connection '1371512807'
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,478 [ec-1] DEBUG SQLTransaction - [builtinApplication.people_fetch] Started new gradrecord transaction "1371512807"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,478 [ec-1] DEBUG SQLDataSource - [builtinApplication.people_fetch] Setting DSRequest as being part of a transaction
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,478 [ec-1] INFO SQLDriver - [builtinApplication.people_fetch] Executing SQL query on 'gradrecord' using connection '1371512807': SELECT develPersonnel.people.id_People, develPersonnel.people.creationName, develPersonnel.people.creationTimestamp, develPersonnel.people.modificationName, develPersonnel.people.modificationTimestamp, develPersonnel.people.nameLast, develPersonnel.people.nameFirst, develPersonnel.people.nameMiddle, develPersonnel.people.namePreferred, develPersonnel.people.nameInitials, develPersonnel.people.spouseName, develPersonnel.people.dateOfBirth, develPersonnel.people.gender, develPersonnel.people.payrollNotes, develPersonnel.people.includeInDirectory, develPersonnel.people.isGroupPI, develPersonnel.people.directoryType, develPersonnel.people.directoryTitle1, develPersonnel.people.directoryTitle2, develPersonnel.people.directoryTitle3, develPersonnel.people.emailAddress, develPersonnel.people.forwardingName, develPersonnel.people.forwardingAddress1, develPersonnel.people.forwardingAddress2, develPersonnel.people.forwardingCity, develPersonnel.people.forwardingState, develPersonnel.people.forwardingPostalCode, develPersonnel.people.forwardingCountry, develPersonnel.people.forwardingPhone, develPersonnel.people.forwardingModificationDate, develPersonnel.people.forwardingModificationName, develPersonnel.people.personNotes, develPersonnel.people.photo_filename, develPersonnel.people.photo_filesize, concat(people.nameLast,', ',people.nameFirst) AS lastFirst FROM develPersonnel.people WHERE ('1'='1')
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,620 [ec-1] INFO DSResponse - DSResponse: List with 3895 items
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,620 [ec-1] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,620 [ec-1] DEBUG SQLTransaction - Committing gradrecord transaction "1371512807"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,621 [ec-1] DEBUG RPCManager - non-DMI response, dropExtraFields: false
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,852 [ec-1] DEBUG SQLTransaction - getConnection() looked for transactional connection for gradrecord: hashcode "1371512807"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,852 [ec-1] WARN SQLTransaction - Ending gradrecord transaction "1371512807"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,853 [ec-1] DEBUG SQLConnectionManager - About to close connection with hashcode "1371512807"
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,853 [ec-1] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1371512807
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,854 [ec-1] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 649
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,854 [ec-1] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 649
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,854 [ec-1] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 649
    May 23 11:12:36 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:36,923 [ec-1] INFO Compression - /devel/isomorphic/IDACall: 2849645 -> 187735 bytes
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,188 [ec-8] INFO RequestContext - URL: '/devel/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36': Safari with Accept-Encoding header
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,190 [ec-8] DEBUG XML - Parsed XML from (in memory stream): 1ms
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,191 [ec-8] DEBUG RPCManager - Processing 1 requests.
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,191 [ec-8] DEBUG RPCManager - Request #1 (DSRequest) payload: {
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: criteria:{
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: id_People:-70,
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: download_fieldname:"photo",
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: download_filename:null
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: },
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: operationConfig:{
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: dataSource:"people",
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: repo:null,
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: operationType:"viewFile",
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: textMatchStyle:"exact"
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: },
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: appID:"builtinApplication",
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: operation:"people_viewFile",
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: oldValues:{
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: id_People:-70,
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: download_fieldname:"photo",
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: download_filename:null
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: }
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: }
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,191 [ec-8] INFO IDACall - Performing 1 operation(s)
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,191 [ec-8] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,191 [ec-8] DEBUG DeclarativeSecurity - DataSource people is not in the pre-checked list, processing...
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,191 [ec-8] DEBUG AppBase - [builtinApplication.people_viewFile] No userTypes defined, allowing anyone access to all operations for this application
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,191 [ec-8] DEBUG AppBase - [builtinApplication.people_viewFile] No public zero-argument method named '_people_viewFile' found, performing generic datasource operation
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,192 [ec-8] DEBUG DeclarativeSecurity - [builtinApplication.people_viewFile] Processing security checks for DataSource null, field null
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,192 [ec-8] DEBUG DeclarativeSecurity - [builtinApplication.people_viewFile] Request is not a client request, ignoring security checks.
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,192 [ec-8] DEBUG AppBase - [builtinApplication.people_viewFile, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,192 [ec-8] DEBUG AppBase - [builtinApplication.people_viewFile, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,192 [ec-8] INFO SQLDataSource - [builtinApplication.people_viewFile, builtinApplication.null] Performing fetch operation with
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: criteria: {id_People:-70,download_fieldname:"photo",download_filename:null} values: {id_People:-70,download_fieldname:"photo",download_filename:null}
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,193 [ec-8] DEBUG SQLDataSource - [builtinApplication.people_viewFile, builtinApplication.null] DataSource 656 acquired SQLDriver instance 53903 during initialization
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,193 [ec-8] INFO SQLDataSource - [builtinApplication.people_viewFile, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,194 [ec-8] DEBUG PoolableSQLConnectionFactory - [builtinApplication.people_viewFile, builtinApplication.null] Executing pingTest 'select 1 from dual' on connection 1371512807
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,194 [ec-8] INFO SQLDataSource - [builtinApplication.people_viewFile, builtinApplication.null] 656: Executing SQL query on 'gradrecord': SELECT develPersonnel.people.id_People, develPersonnel.people.creationName, develPersonnel.people.creationTimestamp, develPersonnel.people.modificationName, develPersonnel.people.modificationTimestamp, develPersonnel.people.nameLast, develPersonnel.people.nameFirst, develPersonnel.people.nameMiddle, develPersonnel.people.namePreferred, develPersonnel.people.nameInitials, develPersonnel.people.spouseName, develPersonnel.people.dateOfBirth, develPersonnel.people.gender, develPersonnel.people.hrsPersonID, develPersonnel.people.uwPVI, develPersonnel.people.isisEmplID, develPersonnel.people.isisCampusID, develPersonnel.people.uwPhotoID, develPersonnel.people.uwNetID, develPersonnel.people.caeUserName, develPersonnel.people.payrollNotes, develPersonnel.people.includeInDirectory, develPersonnel.people.isGroupPI, develPersonnel.people.directoryType, develPersonnel.people.directoryTitle1, develPersonnel.people.directoryTitle2, develPersonnel.people.directoryTitle3, develPersonnel.people.emailAddress, develPersonnel.people.emergencyContactName, develPersonnel.people.emergencyContactAddress1, develPersonnel.people.emergencyContactAddress2, develPersonnel.people.emergencyContactCity, develPersonnel.people.emergencyContactState, develPersonnel.people.emergencyContactPostalCode, develPersonnel.people.emergencyContactCountry, develPersonnel.people.emergencyContactPhone, develPersonnel.people.forwardingName, develPersonnel.people.forwardingAddress1, develPersonnel.people.forwardingAddress2, develPersonnel.people.forwardingCity, develPersonnel.people.forwardingState, develPersonnel.people.forwardingPostalCode, develPersonnel.people.forwardingCountry, develPersonnel.people.forwardingPhone, develPersonnel.people.forwardingModificationDate, develPersonnel.people.forwardingModificationName, develPersonnel.people.personNotes, develPersonnel.people.photo, develPersonnel.people.photo_filename, develPersonnel.people.photo_filesize, concat(people.nameLast,', ',people.nameFirst) AS lastFirst FROM develPersonnel.people WHERE (develPersonnel.people.id_People=-70)
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,195 [ec-8] DEBUG SQLConnectionManager - [builtinApplication.people_viewFile, builtinApplication.null] Borrowed connection '1371512807'
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,195 [ec-8] DEBUG SQLTransaction - [builtinApplication.people_viewFile, builtinApplication.null] Started new gradrecord transaction "1371512807"
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,195 [ec-8] DEBUG SQLDataSource - [builtinApplication.people_viewFile, builtinApplication.null] Setting DSRequest as being part of a transaction
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,195 [ec-8] INFO SQLDriver - [builtinApplication.people_viewFile, builtinApplication.null] Executing SQL query on 'gradrecord' using connection '1371512807': SELECT develPersonnel.people.id_People, develPersonnel.people.creationName, develPersonnel.people.creationTimestamp, develPersonnel.people.modificationName, develPersonnel.people.modificationTimestamp, develPersonnel.people.nameLast, develPersonnel.people.nameFirst, develPersonnel.people.nameMiddle, develPersonnel.people.namePreferred, develPersonnel.people.nameInitials, develPersonnel.people.spouseName, develPersonnel.people.dateOfBirth, develPersonnel.people.gender, develPersonnel.people.hrsPersonID, develPersonnel.people.uwPVI, develPersonnel.people.isisEmplID, develPersonnel.people.isisCampusID, develPersonnel.people.uwPhotoID, develPersonnel.people.uwNetID, develPersonnel.people.caeUserName, develPersonnel.people.payrollNotes, develPersonnel.people.includeInDirectory, develPersonnel.people.isGroupPI, develPersonnel.people.directoryType, develPersonnel.people.directoryTitle1, develPersonnel.people.directoryTitle2, develPersonnel.people.directoryTitle3, develPersonnel.people.emailAddress, develPersonnel.people.emergencyContactName, develPersonnel.people.emergencyContactAddress1, develPersonnel.people.emergencyContactAddress2, develPersonnel.people.emergencyContactCity, develPersonnel.people.emergencyContactState, develPersonnel.people.emergencyContactPostalCode, develPersonnel.people.emergencyContactCountry, develPersonnel.people.emergencyContactPhone, develPersonnel.people.forwardingName, develPersonnel.people.forwardingAddress1, develPersonnel.people.forwardingAddress2, develPersonnel.people.forwardingCity, develPersonnel.people.forwardingState, develPersonnel.people.forwardingPostalCode, develPersonnel.people.forwardingCountry, develPersonnel.people.forwardingPhone, develPersonnel.people.forwardingModificationDate, develPersonnel.people.forwardingModificationName, develPersonnel.people.personNotes, develPersonnel.people.photo, develPersonnel.people.photo_filename, develPersonnel.people.photo_filesize, concat(people.nameLast,', ',people.nameFirst) AS lastFirst FROM develPersonnel.people WHERE (develPersonnel.people.id_People=-70)
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,197 [ec-8] INFO DSResponse - [builtinApplication.people_viewFile] DSResponse: List with 1 items
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,197 [ec-8] INFO DSResponse - DSResponse: Map with 9 keys
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,198 [ec-8] WARN RPCManager - dsResponse.getData().get("photo") returned null when we were expecting an InputStream, Byte[] or byte[]. Can't continue.
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,198 [ec-8] DEBUG SQLTransaction - getConnection() looked for transactional connection for gradrecord: hashcode "1371512807"
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,198 [ec-8] WARN SQLTransaction - Ending gradrecord transaction "1371512807"
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,199 [ec-8] DEBUG SQLConnectionManager - About to close connection with hashcode "1371512807"
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,199 [ec-8] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1371512807
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,200 [ec-8] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 649
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,200 [ec-8] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 649
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,200 [ec-8] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 649
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,200 [ec-8] DEBUG SQLTransaction - getConnection() looked for transactional connection for gradrecord: (connection is null)
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,200 [ec-8] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 656
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,200 [ec-8] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 656
    May 23 11:12:37 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-23 16:12:37,200 [ec-8] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 656

    #2
    The DataSource.schema attribute can be used to specify the schema that needs to be used as a tableName prefix. This allows you to get rid of your attempted hack, which as you found, doesn't work.

    Comment


      #3
      Thanks for pointing out the schema property. Unfortunately I'm still getting the same behavior. Maybe I've got something still wrong with my form?

      Thanks

      The DataSource tag is now:
      <DataSource ID="people" dataFormat="iscServer" serverType="sql" dataSourceVersion="1" dbName="gradrecord" schema="develPersonnel" tableName="people" quoteTableName="false" tableCode="12a032ce9179c32a6c7ab397b9d871fa" allowAdvancedCriteria="true" generatedBy="v11.0p_2017-05-15/PowerEdition Deployment 2017-05-15">

      With form:
      isc.DynamicForm.create({
      ID:"photoForm",
      autoDraw:false,
      dataSource:"people",
      numCols:1,
      canEdit:true,
      fields:[
      {
      name:"photo",
      autoDraw:false,
      showTitle:false,
      showFileInline:false,
      width:150,
      height:200,
      _constructor:"ViewFileItem"
      }
      ]
      });

      and fetch call:

      photoForm.fetchData({isiEmplID:record.emplID});


      I still get SQL where 1=1

      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,509 [ec-6] DEBUG RPCManager - Processing 1 requests.
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,509 [ec-6] DEBUG RPCManager - Request #1 (DSRequest) payload: {
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: criteria:{
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: isiEmplID:"0005713600"
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: },
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: operationConfig:{
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: dataSource:"people",
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: repo:null,
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: operationType:"fetch",
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: textMatchStyle:"exact"
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: },
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: componentId:"photoForm",
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: appID:"builtinApplication",
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: operation:"people_fetch",
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: oldValues:{
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: isiEmplID:"0005713600"
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: }
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: }
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,509 [ec-6] INFO IDACall - Performing 1 operation(s)
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,509 [ec-6] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,509 [ec-6] DEBUG DeclarativeSecurity - DataSource people is not in the pre-checked list, processing...
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,510 [ec-6] DEBUG AppBase - [builtinApplication.people_fetch] No userTypes defined, allowing anyone access to all operations for this application
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,510 [ec-6] DEBUG AppBase - [builtinApplication.people_fetch] No public zero-argument method named '_people_fetch' found, performing generic datasource operation
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,510 [ec-6] INFO SQLDataSource - [builtinApplication.people_fetch] Performing fetch operation with
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: criteria: {isiEmplID:"0005713600"} values: {isiEmplID:"0005713600"}
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,511 [ec-6] INFO SQLDataSource - [builtinApplication.people_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,511 [ec-6] INFO SQLDataSource - [builtinApplication.people_fetch] 351: Executing SQL query on 'gradrecord': SELECT people.id_People, people.creationName, people.creationTimestamp, people.modificationName, people.modificationTimestamp, people.nameLast, people.nameFirst, people.nameMiddle, people.namePreferred, people.nameInitials, people.spouseName, people.dateOfBirth, people.gender, people.payrollNotes, people.includeInDirectory, people.isGroupPI, people.directoryType, people.directoryTitle1, people.directoryTitle2, people.directoryTitle3, people.emailAddress, people.forwardingName, people.forwardingAddress1, people.forwardingAddress2, people.forwardingCity, people.forwardingState, people.forwardingPostalCode, people.forwardingCountry, people.forwardingPhone, people.forwardingModificationDate, people.forwardingModificationName, people.personNotes, people.photo_filename, people.photo_filesize, concat(people.nameLast,', ',people.nameFirst) AS lastFirst FROM develPersonnel.people WHERE ('1'='1')
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,511 [ec-6] DEBUG PoolableSQLConnectionFactory - [builtinApplication.people_fetch] Executing pingTest 'select 1 from dual' on connection 563116413
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,512 [ec-6] DEBUG SQLConnectionManager - [builtinApplication.people_fetch] Borrowed connection '563116413'
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,512 [ec-6] DEBUG SQLTransaction - [builtinApplication.people_fetch] Started new gradrecord transaction "563116413"
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,513 [ec-6] DEBUG SQLDataSource - [builtinApplication.people_fetch] Setting DSRequest as being part of a transaction
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,513 [ec-6] INFO SQLDriver - [builtinApplication.people_fetch] Executing SQL query on 'gradrecord' using connection '563116413': SELECT people.id_People, people.creationName, people.creationTimestamp, people.modificationName, people.modificationTimestamp, people.nameLast, people.nameFirst, people.nameMiddle, people.namePreferred, people.nameInitials, people.spouseName, people.dateOfBirth, people.gender, people.payrollNotes, people.includeInDirectory, people.isGroupPI, people.directoryType, people.directoryTitle1, people.directoryTitle2, people.directoryTitle3, people.emailAddress, people.forwardingName, people.forwardingAddress1, people.forwardingAddress2, people.forwardingCity, people.forwardingState, people.forwardingPostalCode, people.forwardingCountry, people.forwardingPhone, people.forwardingModificationDate, people.forwardingModificationName, people.personNotes, people.photo_filename, people.photo_filesize, concat(people.nameLast,', ',people.nameFirst) AS lastFirst FROM develPersonnel.people WHERE ('1'='1')
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,777 [ec-6] INFO DSResponse - DSResponse: List with 3895 items
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,777 [ec-6] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,777 [ec-6] DEBUG SQLTransaction - Committing gradrecord transaction "563116413"
      May 24 09:44:50 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:50,778 [ec-6] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,013 [ec-6] DEBUG SQLTransaction - getConnection() looked for transactional connection for gradrecord: hashcode "563116413"
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,013 [ec-6] WARN SQLTransaction - Ending gradrecord transaction "563116413"
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,014 [ec-6] DEBUG SQLConnectionManager - About to close connection with hashcode "563116413"
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,014 [ec-6] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 563116413
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,015 [ec-6] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 351
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,015 [ec-6] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 351
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,015 [ec-6] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 351
      May 24 09:44:51 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 14:44:51,082 [ec-6] INFO Compression - /devel/isomorphic/IDACall: 2849645 -> 187735 bytes

      Comment


        #4
        For completeness I now have a simple test case that illustrates the behavior.

        isc.DynamicForm.create({
        ID:"photoForm",
        autoDraw:false,
        dataSource:"people",
        numCols:1,
        canEdit:true,
        fields:[
        {
        name:"nameLast"
        },
        {
        name:"nameFirst"
        }
        ]
        });

        isc.Button.create({
        ID:"testButton",
        autoDraw:true,
        title:"Click to test",
        click:function() {photoForm.fetchData({isiEmplID:"0005498676"})}
        });

        photoForm.fetchData({isiEmplID:"0005498676"});

        isc.VLayout.create({
        ID:"testLayout",
        autoDraw:true,
        height:"100%",
        width:"100%",
        members:[
        testButton,
        photoForm
        ]
        });


        Generates essentially the same SQL when the button is clicked to fetchData.

        Comment


          #5
          I just now did a test where I put the data base name in server.properties and removed the schema from ds.xml and get the same result.

          Comment


            #6
            This isn’t really a test case, as we have neither the DataSource nor the schema nor test data.

            Please be specific about what’s going wrong here. We see some requests that end up with a blank where clause. This would be expected if the field in question wasn’t declared in the DataSource. But we don’t have the DataSource definition.

            Comment


              #7
              I actually found a work-around. I replaced the criterion in fetchData with an explicit Advanced criterion and it now returns the correct result. Apparently fetchData doesn't like the short cut criteria notation.


              The button with the full criterion in the click function.

              isc.Button.create({
              ID:"testButton",
              autoDraw:true,
              title:"Click to test",
              click:function() {photoForm.fetchData({
              _constructor:"AdvancedCriteria",
              fieldName:"isisEmplID",
              operator:"equals",
              value:"0005498676"
              })}
              });

              Comment


                #8
                And now a more full example.

                DataSource:

                <DataSource ID="people" dataFormat="iscServer" serverType="sql" dataSourceVersion="1" dbName="gradrecord" schema="develPersonnel" tableName="people" quoteTableName="false" tableCode="12a032ce9179c32a6c7ab397b9d871fa" allowAdvancedCriteria="true" generatedBy="v11.0p_2017-05-15/PowerEdition Deployment 2017-05-15">
                <fields >
                <field name="id_People" type="sequence" title="5-digit unique ID number" primaryKey="true" columnCode="b80bb7740288fda1f201890375a60c8f" >
                <validators>
                <Validator>
                <type>isInteger</type>
                <stopIfFalse>true</stopIfFalse>
                </Validator>
                </validators>
                </field>
                <field name="modificationTimestamp" type="modifierTimestamp" title="Date/time at last modification" columnCode="d47dcb3d1813a63b358e2483c6fab435" >
                <validators>
                <Validator>
                <type>isDate</type>
                <stopIfFalse>true</stopIfFalse>
                </Validator>
                </validators>
                </field>
                <field name="nameLast" type="text" length="40" title="Last name" columnCode="1b4eddfd113273c5daf1bc74e50a5cc8" >
                <validators>
                <Validator>
                <type>isString</type>
                <stopIfFalse>true</stopIfFalse>
                </Validator>
                </validators>
                </field>
                <field name="nameFirst" type="text" length="40" title="First name" columnCode="e2af3968e57cc418dc3356831a570c70" >
                <validators>
                <Validator>
                <type>isString</type>
                <stopIfFalse>true</stopIfFalse>
                </Validator>
                </validators>
                </field>
                <field name="isisEmplID" type="text" length="10" title="Empl ID in ISIS" viewRequiresRole="uw:org:cbe:personnelEditAll" columnCode="20db8c61285e08ebc257727723382078" >
                <validators>
                <Validator>
                <type>isString</type>
                <stopIfFalse>true</stopIfFalse>
                </Validator>
                </validators>
                </field>
                </fields>
                <sequenceMode>jdbcDriver</sequenceMode>
                </DataSource>

                working javascript code:

                isc.DynamicForm.create({
                ID:"photoForm",
                autoDraw:false,
                dataSource:"people",
                numCols:1,
                canEdit:true,
                fields:[
                {
                name:"nameLast"
                },
                {
                name:"nameFirst"
                }
                ]
                });

                isc.Button.create({
                ID:"testButton",
                autoDraw:true,
                title:"Click to test",
                click:function() {photoForm.fetchData({
                _constructor:"AdvancedCriteria",
                fieldName:"isisEmplID",
                operator:"equals",
                value:"0005498676"
                })}
                });

                isc.VLayout.create({
                ID:"testLayout",
                autoDraw:true,
                height:"100%",
                width:"100%",
                members:[
                testButton,
                photoForm
                ]
                });


                Failing javascript code:
                isc.DynamicForm.create({
                ID:"photoForm",
                autoDraw:false,
                dataSource:"people",
                numCols:1,
                canEdit:true,
                fields:[
                {
                name:"nameLast"
                },
                {
                name:"nameFirst"
                }
                ]
                });

                isc.Button.create({
                ID:"testButton",
                autoDraw:true,
                title:"Click to test",
                click:function() {photoForm.fetchData({isisEmplID:"0005498676"})}
                });

                isc.VLayout.create({
                ID:"testLayout",
                autoDraw:true,
                height:"100%",
                width:"100%",
                members:[
                testButton,
                photoForm
                ]
                });


                The server log of the failure:

                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,273 [ec-2] DEBUG RPCManager - Processing 1 requests.
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,274 [ec-2] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: criteria:{
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: isisEmplID:"0005498676"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: },
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: operationConfig:{
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: dataSource:"people",
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: repo:null,
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: operationType:"fetch",
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: textMatchStyle:"exact"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: },
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: componentId:"photoForm",
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: appID:"builtinApplication",
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: operation:"people_fetch",
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: oldValues:{
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: isisEmplID:"0005498676"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: }
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: }
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,274 [ec-2] INFO IDACall - Performing 1 operation(s)
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,275 [ec-2] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,275 [ec-2] DEBUG DeclarativeSecurity - DataSource people is not in the pre-checked list, processing...
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,276 [ec-2] DEBUG AppBase - [builtinApplication.people_fetch] No userTypes defined, allowing anyone access to all operations for this application
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,276 [ec-2] DEBUG AppBase - [builtinApplication.people_fetch] No public zero-argument method named '_people_fetch' found, performing generic datasource operation
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,277 [ec-2] INFO SQLDataSource - [builtinApplication.people_fetch] Performing fetch operation with
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: criteria: {} values: {}
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,277 [ec-2] INFO SQLWhereClause - [builtinApplication.people_fetch] empty condition
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,278 [ec-2] INFO SQLDataSource - [builtinApplication.people_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,289 [ec-2] INFO SQLDataSource - [builtinApplication.people_fetch] 74: Executing SQL query on 'gradrecord': SELECT people.id_People, people.modificationTimestamp, people.nameLast, people.nameFirst FROM develPersonnel.people WHERE ('1'='1')
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,290 [ec-2] DEBUG PoolableSQLConnectionFactory - [builtinApplication.people_fetch] Executing pingTest 'select 1 from dual' on connection 1577384927
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,291 [ec-2] DEBUG SQLConnectionManager - [builtinApplication.people_fetch] Borrowed connection '1577384927'
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,292 [ec-2] DEBUG SQLTransaction - [builtinApplication.people_fetch] Started new gradrecord transaction "1577384927"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,292 [ec-2] DEBUG SQLDataSource - [builtinApplication.people_fetch] Setting DSRequest as being part of a transaction
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,292 [ec-2] INFO SQLDriver - [builtinApplication.people_fetch] Executing SQL query on 'gradrecord' using connection '1577384927': SELECT people.id_People, people.modificationTimestamp, people.nameLast, people.nameFirst FROM develPersonnel.people WHERE ('1'='1')
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,440 [ec-2] INFO DSResponse - DSResponse: List with 3895 items
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,440 [ec-2] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,440 [ec-2] DEBUG SQLTransaction - Committing gradrecord transaction "1577384927"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,441 [ec-2] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,618 [ec-2] DEBUG SQLTransaction - getConnection() looked for transactional connection for gradrecord: hashcode "1577384927"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,619 [ec-2] WARN SQLTransaction - Ending gradrecord transaction "1577384927"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,619 [ec-2] DEBUG SQLConnectionManager - About to close connection with hashcode "1577384927"
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,620 [ec-2] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1577384927
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,621 [ec-2] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,621 [ec-2] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,621 [ec-2] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                May 24 16:01:34 dbdevel/dbdevel develgradrecord[17894]: === 2018-05-24 21:01:34,634 [ec-2] INFO Compression - /devel/isomorphic/IDACall: 401350 -> 53350 bytes





                Comment


                  #9
                  One other note. The test I just posted was run with today's nightly build: SmartClient_v120p_2018-05-23_PowerEdition

                  Thanks.

                  Comment


                    #10
                    That is not a "shorthand" criteria, it's the simple Criteria format. And there's no problem with using it with fetchData(), you can see in your logs that it makes it to the server as expected.

                    Then, something removes the criteria, also visible in the logs. Perhaps the user you are testing with does not have the role you've required to allow viewing the field? This is required to query on the field as well, for obvious reasons.

                    Comment


                      #11
                      I think you have a point about there being a bug in the server code. When I run the test code posted above using the built-in server from smartClientSDK in a freshly unzipped copy SmartClient_v120p_2018-05-23_PowerEdition using the simple Criterion format I get this in the server log:


                      === 2018-05-25 19:15:47,919 [ec-7] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36': Safari with Accept-Encoding header
                      === 2018-05-25 19:15:47,938 [ec-7] DEBUG XML - Parsed XML from (in memory stream): 16ms
                      === 2018-05-25 19:15:47,940 [ec-7] DEBUG RPCManager - Processing 1 requests.
                      === 2018-05-25 19:15:47,941 [ec-7] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                      criteria:{
                      isisEmplID:"0005498676"
                      },
                      operationConfig:{
                      dataSource:"people",
                      repo:null,
                      operationType:"fetch",
                      textMatchStyle:"exact"
                      },
                      componentId:"photoForm",
                      appID:"builtinApplication",
                      operation:"people_fetch",
                      oldValues:{
                      isisEmplID:"0005498676"
                      }
                      }
                      === 2018-05-25 19:15:47,941 [ec-7] INFO IDACall - Performing 1 operation(s)
                      === 2018-05-25 19:15:47,941 [ec-7] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                      === 2018-05-25 19:15:47,942 [ec-7] DEBUG DeclarativeSecurity - DataSource people is not in the pre-checked list, processing...
                      === 2018-05-25 19:15:47,942 [ec-7] DEBUG AppBase - [builtinApplication.people_fetch] No userTypes defined, allowing anyone access to all operations for this application
                      === 2018-05-25 19:15:47,942 [ec-7] DEBUG AppBase - [builtinApplication.people_fetch] No public zero-argument method named '_people_fetch' found, performing generic datasource operation
                      === 2018-05-25 19:15:47,943 [ec-7] INFO SQLDataSource - [builtinApplication.people_fetch] Performing fetch operation with
                      criteria: {} values: {}
                      === 2018-05-25 19:15:47,943 [ec-7] INFO SQLWhereClause - [builtinApplication.people_fetch] empty condition
                      === 2018-05-25 19:15:47,943 [ec-7] INFO SQLDataSource - [builtinApplication.people_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                      === 2018-05-25 19:15:47,944 [ec-7] INFO SQLDataSource - [builtinApplication.people_fetch] 74: Executing SQL query on 'gradrecord': SELECT people.id_People, people.modificationTimestamp, people.nameLast, people.nameFirst FROM develPersonnel.people WHERE ('1'='1')
                      === 2018-05-25 19:15:47,944 [ec-7] DEBUG PoolableSQLConnectionFactory - [builtinApplication.people_fetch] Executing pingTest 'select 1 from dual' on connection 1223809305
                      === 2018-05-25 19:15:47,945 [ec-7] DEBUG SQLConnectionManager - [builtinApplication.people_fetch] Borrowed connection '1223809305'
                      === 2018-05-25 19:15:47,946 [ec-7] DEBUG SQLTransaction - [builtinApplication.people_fetch] Started new gradrecord transaction "1223809305"
                      === 2018-05-25 19:15:47,946 [ec-7] DEBUG SQLDataSource - [builtinApplication.people_fetch] Setting DSRequest as being part of a transaction
                      === 2018-05-25 19:15:47,946 [ec-7] INFO SQLDriver - [builtinApplication.people_fetch] Executing SQL query on 'gradrecord' using connection '1223809305': SELECT people.id_People, people.modificationTimestamp, people.nameLast, people.nameFirst FROM develPersonnel.people WHERE ('1'='1')
                      === 2018-05-25 19:15:48,052 [ec-7] INFO DSResponse - DSResponse: List with 3895 items
                      === 2018-05-25 19:15:48,052 [ec-7] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                      === 2018-05-25 19:15:48,053 [ec-7] DEBUG SQLTransaction - Committing gradrecord transaction "1223809305"
                      === 2018-05-25 19:15:48,053 [ec-7] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                      === 2018-05-25 19:15:48,139 [ec-7] DEBUG SQLTransaction - getConnection() looked for transactional connection for gradrecord: hashcode "1223809305"
                      === 2018-05-25 19:15:48,139 [ec-7] WARN SQLTransaction - Ending gradrecord transaction "1223809305"
                      === 2018-05-25 19:15:48,140 [ec-7] DEBUG SQLConnectionManager - About to close connection with hashcode "1223809305"
                      === 2018-05-25 19:15:48,140 [ec-7] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1223809305
                      === 2018-05-25 19:15:48,141 [ec-7] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                      === 2018-05-25 19:15:48,141 [ec-7] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                      === 2018-05-25 19:15:48,141 [ec-7] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74


                      And when I run the test using the built-in server from the SDK using advanced criteria I get this log:


                      === 2018-05-25 19:22:40,376 [ec-9] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36': Safari with Accept-Encoding header
                      === 2018-05-25 19:22:40,391 [ec-9] DEBUG XML - Parsed XML from (in memory stream): 1ms
                      === 2018-05-25 19:22:40,393 [ec-9] DEBUG XML - Parsed XML from /tank0/SmartClient12/SmartClient_v120p_2018-05-23_PowerEdition/smartclientSDK/isomorphic/system/schema/List.ds.xml: 1ms
                      === 2018-05-25 19:22:40,397 [ec-9] DEBUG RPCManager - Processing 1 requests.
                      === 2018-05-25 19:22:40,411 [ec-9] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                      criteria:{
                      _constructor:"AdvancedCriteria",
                      fieldName:"isisEmplID",
                      operator:"equals",
                      value:"0005498676"
                      },
                      operationConfig:{
                      dataSource:"people",
                      repo:null,
                      operationType:"fetch",
                      textMatchStyle:"exact"
                      },
                      componentId:"photoForm",
                      appID:"builtinApplication",
                      operation:"people_fetch",
                      oldValues:{
                      _constructor:"AdvancedCriteria",
                      fieldName:"isisEmplID",
                      operator:"equals",
                      value:"0005498676"
                      }
                      }
                      === 2018-05-25 19:22:40,413 [ec-9] INFO IDACall - Performing 1 operation(s)
                      === 2018-05-25 19:22:40,416 [ec-9] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                      === 2018-05-25 19:22:40,416 [ec-9] DEBUG DeclarativeSecurity - DataSource people is not in the pre-checked list, processing...
                      === 2018-05-25 19:22:40,456 [ec-9] DEBUG AppBase - [builtinApplication.people_fetch] No userTypes defined, allowing anyone access to all operations for this application
                      === 2018-05-25 19:22:40,456 [ec-9] DEBUG AppBase - [builtinApplication.people_fetch] No public zero-argument method named '_people_fetch' found, performing generic datasource operation
                      === 2018-05-25 19:22:40,457 [ec-9] INFO SQLDataSource - [builtinApplication.people_fetch] Performing fetch operation with
                      criteria: {_constructor:"AdvancedCriteria",fieldName:"isisEmplID",operator:"equals",value:"0005498676"} values: {_constructor:"AdvancedCriteria",fieldName:"isisEmplID",operator:"equals",value:"0005498676"}
                      === 2018-05-25 19:22:40,459 [ec-9] DEBUG SQLDriver - [builtinApplication.people_fetch] gradrecord: Initializing SQL config using interface.type: datasource with driver: org.mariadb.jdbc.MariaDbDataSource
                      === 2018-05-25 19:22:40,464 [ec-9] INFO DataTools - [builtinApplication.people_fetch] While applying to org.mariadb.jdbc.MariaDbDataSource, couldn't setProperties:
                      {
                      context:"No such property",
                      networkProtocol:"No such property"
                      }
                      === 2018-05-25 19:22:40,552 [ec-9] DEBUG SQLDriver - [builtinApplication.people_fetch] gradrecord: Database metadata: {
                      driverName:"MariaDB connector/J",
                      driverMajorVersion:2,
                      driverMinorVersion:2,
                      databaseProductName:"MySQL",
                      databaseProductVersion:"5.6.20-log",
                      databaseMinorVersion:6,
                      databaseMajorVersion:5,
                      JDBCMinorVersion:2,
                      driverVersion:"2.2.3",
                      JDBCMajorVersion:4
                      }
                      === 2018-05-25 19:22:40,554 [ec-9] DEBUG SQLDataSource - [builtinApplication.people_fetch] DataSource 74 acquired SQLDriver instance 121812163 during initialization
                      === 2018-05-25 19:22:40,561 [ec-9] INFO SQLDataSource - [builtinApplication.people_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                      === 2018-05-25 19:22:40,562 [ec-9] INFO Velocity - [builtinApplication.people_fetch] Velocity Tools not available - using standard Velocity Contexts.
                      === 2018-05-25 19:22:40,565 [ec-9] DEBUG Velocity - [builtinApplication.people_fetch] Velocity config: {
                      }
                      === 2018-05-25 19:22:40,582 [ec-9] DEBUG Velocity - Log4JLogChute using logger 'org.apache.Velocity'
                      === 2018-05-25 19:22:40,582 [ec-9] DEBUG Velocity - Initializing Velocity, Calling init()...
                      === 2018-05-25 19:22:40,583 [ec-9] DEBUG Velocity - Starting Apache Velocity v1.7 (compiled: 2010-11-19 12:14:37)
                      === 2018-05-25 19:22:40,583 [ec-9] DEBUG Velocity - Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
                      === 2018-05-25 19:22:40,583 [ec-9] DEBUG Velocity - Trying to use logger class org.apache.velocity.runtime.log.Log4JLogChute
                      === 2018-05-25 19:22:40,583 [ec-9] DEBUG Velocity - Using logger class org.apache.velocity.runtime.log.Log4JLogChute
                      === 2018-05-25 19:22:40,586 [ec-9] DEBUG Velocity - ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader
                      === 2018-05-25 19:22:40,586 [ec-9] DEBUG Velocity - Do unicode file recognition: false
                      === 2018-05-25 19:22:40,586 [ec-9] DEBUG Velocity - FileResourceLoader : adding path ''
                      === 2018-05-25 19:22:40,586 [ec-9] DEBUG Velocity - ResourceCache: initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl) with class java.util.Collections$SynchronizedMap cache map.
                      === 2018-05-25 19:22:40,587 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Stop
                      === 2018-05-25 19:22:40,588 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Define
                      === 2018-05-25 19:22:40,588 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Break
                      === 2018-05-25 19:22:40,589 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Evaluate
                      === 2018-05-25 19:22:40,589 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Literal
                      === 2018-05-25 19:22:40,590 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Macro
                      === 2018-05-25 19:22:40,590 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Parse
                      === 2018-05-25 19:22:40,591 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Include
                      === 2018-05-25 19:22:40,591 [ec-9] DEBUG Velocity - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
                      === 2018-05-25 19:22:40,609 [ec-9] DEBUG Velocity - Created '20' parsers.
                      === 2018-05-25 19:22:40,612 [ec-9] DEBUG Velocity - Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm
                      === 2018-05-25 19:22:40,612 [ec-9] DEBUG Velocity - Velocimacro : Default library not found.
                      === 2018-05-25 19:22:40,613 [ec-9] DEBUG Velocity - Velocimacro : allowInline = true : VMs can be defined inline in templates
                      === 2018-05-25 19:22:40,613 [ec-9] DEBUG Velocity - Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
                      === 2018-05-25 19:22:40,613 [ec-9] DEBUG Velocity - Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
                      === 2018-05-25 19:22:40,613 [ec-9] DEBUG Velocity - Velocimacro : autoload off : VM system will not automatically reload global library macros
                      === 2018-05-25 19:22:40,618 [ec-9] INFO SQLDataSource - [builtinApplication.people_fetch] 74: Executing SQL query on 'gradrecord': SELECT people.id_People, people.modificationTimestamp, people.nameLast, people.nameFirst FROM develPersonnel.people WHERE (people.isisEmplID LIKE BINARY '0005498676' AND people.isisEmplID IS NOT NULL)
                      === 2018-05-25 19:22:40,620 [ec-9] INFO PoolManager - [builtinApplication.people_fetch] SmartClient pooling started for 'gradrecord' objects
                      === 2018-05-25 19:22:40,623 [ec-9] DEBUG PoolableSQLConnectionFactory - [builtinApplication.people_fetch] makeObject() created a pooled Connection '1387103175'
                      === 2018-05-25 19:22:40,628 [ec-9] DEBUG PoolableSQLConnectionFactory - [builtinApplication.people_fetch] Executing pingTest 'select 1 from dual' on connection 1387103175
                      === 2018-05-25 19:22:40,630 [ec-9] DEBUG SQLConnectionManager - [builtinApplication.people_fetch] Borrowed connection '1387103175'
                      === 2018-05-25 19:22:40,631 [ec-9] DEBUG SQLTransaction - [builtinApplication.people_fetch] Started new gradrecord transaction "1387103175"
                      === 2018-05-25 19:22:40,631 [ec-9] DEBUG SQLDataSource - [builtinApplication.people_fetch] Setting DSRequest as being part of a transaction
                      === 2018-05-25 19:22:40,631 [ec-9] INFO SQLDriver - [builtinApplication.people_fetch] Executing SQL query on 'gradrecord' using connection '1387103175': SELECT people.id_People, people.modificationTimestamp, people.nameLast, people.nameFirst FROM develPersonnel.people WHERE (people.isisEmplID LIKE BINARY '0005498676' AND people.isisEmplID IS NOT NULL)
                      === 2018-05-25 19:22:40,641 [ec-9] INFO DSResponse - DSResponse: List with 1 items
                      === 2018-05-25 19:22:40,641 [ec-9] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                      === 2018-05-25 19:22:40,641 [ec-9] DEBUG SQLTransaction - Committing gradrecord transaction "1387103175"
                      === 2018-05-25 19:22:40,642 [ec-9] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                      === 2018-05-25 19:22:40,644 [ec-9] DEBUG SQLTransaction - getConnection() looked for transactional connection for gradrecord: hashcode "1387103175"
                      === 2018-05-25 19:22:40,644 [ec-9] WARN SQLTransaction - Ending gradrecord transaction "1387103175"
                      === 2018-05-25 19:22:40,645 [ec-9] DEBUG SQLConnectionManager - About to close connection with hashcode "1387103175"
                      === 2018-05-25 19:22:40,645 [ec-9] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1387103175
                      === 2018-05-25 19:22:40,645 [ec-9] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                      === 2018-05-25 19:22:40,645 [ec-9] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                      === 2018-05-25 19:22:40,645 [ec-9] DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 74
                      === 2018-05-25 19:22:40,646 [ec-9] INFO Compression - /isomorphic/IDACall: 291 -> 236 bytes



                      Comment


                        #12
                        It looks like you missed the last part of our last post. You've got viewRequiresRole on that field. If the user doesn't have that role, we would expect the criteria for that field to be stripped.

                        Does the user have the necessary role to be using that field?

                        Comment

                        Working...
                        X