I have verified in debug that req.getHttpServletRequest().getRemoteUser() does in fact have the correct value for the logged in user just prior to the request being processed by the framework. But the SQL INSERT that gets generated has modifiedBy=''. Here is the server log showing the update request.
Code:
=== 2012-02-28 08:30:06,349 [l0-0] DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:{ id:2 }, values:{ id:2, address1:"123 main street" }, operationConfig:{ dataSource:"BuyingAgent", operationType:"update" }, componentId:"isc_ValuesManager_2", appID:"builtinApplication", operation:"BuyingAgent_update", oldValues:{ id:2, modifiedOn:new Date(1330439324000), modifiedBy:"", name:"Secret Agent", state:"", postCode:"abc 123", address1:"123 main", address2:"", externalId:"ABC123", agentFee:9.11111, country:"US", city:"somewhere", _selection_12:true } } --- RPC Operations 1=== 2012-02-28 08:30:06,349 [l0-0] INFO IpIDACall - Performing 1 operation(s) === 2012-02-28 08:30:06,349 [l0-0] DEBUG AppBase - [builtinApplication.BuyingAgent_update] No userTypes defined, allowing anyone access to all operations for this application === 2012-02-28 08:30:06,349 [l0-0] DEBUG AppBase - [builtinApplication.BuyingAgent_update] No public zero-argument method named '_BuyingAgent_update' found, performing generic datasource operation === 2012-02-28 08:31:31,924 [l0-0] INFO SQLDataSource - [builtinApplication.BuyingAgent_update] Performing update operation with criteria: {id:2} values: {id:2,address1:"123 main street",modifiedOn:new Date(1330439406349),modifiedBy:""} === 2012-02-28 08:31:31,925 [l0-0] DEBUG PoolableSQLConnectionFactory - [builtinApplication.BuyingAgent_update] DriverManager fetching connection for iptsfil4 via jdbc url jdbc:as400://ilava;naming=system;prompt=false;user=IPGUI;password=IPGUI;libraries=IPTSFIL4,IPWMFIL4,IPPAFIL4,IPASFIL4,IPTSUTL,PRIMARK === 2012-02-28 08:31:31,925 [l0-0] DEBUG PoolableSQLConnectionFactory - [builtinApplication.BuyingAgent_update] Passing JDBC URL only to getConnection === 2012-02-28 08:31:32,474 [l0-0] DEBUG PoolableSQLConnectionFactory - [builtinApplication.BuyingAgent_update] Returning pooled Connection === 2012-02-28 08:31:32,474 [l0-0] INFO SQLDriver - [builtinApplication.BuyingAgent_update] Executing SQL update on 'iptsfil4': UPDATE BuyingAgent SET address1='123 main street', modifiedBy='', modifiedOn='2012-02-28 08:30:06' WHERE (BuyingAgent.id='2') === 2012-02-28 08:31:33,175 [l0-0] DEBUG SQLDataSource - [builtinApplication.BuyingAgent_update] update operation affected 1 rows === 2012-02-28 08:31:33,175 [l0-0] INFO SQLDataSource - [builtinApplication.BuyingAgent_update] primaryKeys: {id=2}
Comment