Hi
I'm using SmartClient power edition 9.0.
I have the following datasource:
I'm trying to delete a record from the table user_role_person:
BUT, it delete the entire table - delete has NO where clause - see log extract:
=== 2014-02-26 17:04:21,449 [ec-2] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
=== 2014-02-26 17:04:21,450 [ec-2] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
=== 2014-02-26 17:04:21,451 [ec-2] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
=== 2014-02-26 17:04:21,456 [ec-2] INFO SQLDataSource - [builtinApplication.null] Performing remove operation with
criteria: {} values: {}
=== 2014-02-26 17:04:21,457 [ec-2] INFO SQLWhereClause - [builtinApplication.null] empty condition
=== 2014-02-26 17:04:21,460 [ec-2] DEBUG SQLDriver - [builtinApplication.null] About to execute SQL update in 'Mysql' using connection'2123599534'
=== 2014-02-26 17:04:21,460 [ec-2] INFO SQLDriver - [builtinApplication.null] Executing SQL update on 'Mysql': DELETE FROM user_role_person WHERE ('1'='1')
=== 2014-02-26 17:04:21,462 [ec-2] DEBUG SQLDataSource - [builtinApplication.null] remove operation affected 2 rows
=== 2014-02-26 17:04:21,462 [ec-2] DEBUG MysqlDriver - [builtinApplication.null] fetchLastRow data - primaryKeysPresent: {}sequencesNotPresent: [id]
=== 2014-02-26 17:04:21,463 [ec-2] DEBUG SQLDriver - [builtinApplication.null] About to execute SQL query in 'Mysql' using connection '2123599534'
=== 2014-02-26 17:04:21,463 [ec-2] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'Mysql': SELECT LAST_INSERT_ID()
=== 2014-02-26 17:04:21,465 [ec-2] INFO DSResponse - [builtinApplication.null] DSResponse: List with 1 items
What can this be? Please help.
I'm using SmartClient power edition 9.0.
I have the following datasource:
Code:
<DataSource dbName="Mysql" tableName="user_role_person" ID="user_role_person" dataSourceVersion="1" serverType="sql" > <fields> <field sqlType="bigint" primaryKey="true" sqlLength="19" name="id" type="sequence"></field> <field sqlType="bigint" sqlLength="19" name="user_role_id" type="integer"></field> <field sqlType="bigint" sqlLength="19" name="person_id" type="integer"></field> </fields> </DataSource>
Code:
DSRequest dsDeleteUser = new DSRequest(ServerConstants.DATASOURCE_USER_ROLE_PERSON, "remove"); dsDeleteUser.setRPCManager(dsRequest.getRPCManager()); dsDeleteUser.addToCriteria(ServerConstants.FLD_ID_PERSON_ID, (Long)dsRequest.getFieldValue(ServerConstants.FLD_ID_ID)); dsDeleteUser.execute();
=== 2014-02-26 17:04:21,449 [ec-2] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
=== 2014-02-26 17:04:21,450 [ec-2] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
=== 2014-02-26 17:04:21,451 [ec-2] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
=== 2014-02-26 17:04:21,456 [ec-2] INFO SQLDataSource - [builtinApplication.null] Performing remove operation with
criteria: {} values: {}
=== 2014-02-26 17:04:21,457 [ec-2] INFO SQLWhereClause - [builtinApplication.null] empty condition
=== 2014-02-26 17:04:21,460 [ec-2] DEBUG SQLDriver - [builtinApplication.null] About to execute SQL update in 'Mysql' using connection'2123599534'
=== 2014-02-26 17:04:21,460 [ec-2] INFO SQLDriver - [builtinApplication.null] Executing SQL update on 'Mysql': DELETE FROM user_role_person WHERE ('1'='1')
=== 2014-02-26 17:04:21,462 [ec-2] DEBUG SQLDataSource - [builtinApplication.null] remove operation affected 2 rows
=== 2014-02-26 17:04:21,462 [ec-2] DEBUG MysqlDriver - [builtinApplication.null] fetchLastRow data - primaryKeysPresent: {}sequencesNotPresent: [id]
=== 2014-02-26 17:04:21,463 [ec-2] DEBUG SQLDriver - [builtinApplication.null] About to execute SQL query in 'Mysql' using connection '2123599534'
=== 2014-02-26 17:04:21,463 [ec-2] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'Mysql': SELECT LAST_INSERT_ID()
=== 2014-02-26 17:04:21,465 [ec-2] INFO DSResponse - [builtinApplication.null] DSResponse: List with 1 items
What can this be? Please help.
Comment