I am using a DynamicForm with a non-required field (id_source) edited with a SelectItem. The field initially contains a value and is then set to "empty" (null) using the SelectItem. The form is then saved. As shown in the log below, the field appears in the json with a new value (null) and an old value (1) but is missing from the SQL UPDATE query.
Code:
=== 2013-02-17 16:37:54,269 [l0-5] INFO RequestContext - URL: '/isomorphic/RESTHandler', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17': Safari with Accept-Encoding header === 2013-02-17 16:37:54,270 [l0-5] DEBUG RestRequestParser - Parsing json object: '{"transactionNum":99,"dataSource":"ui_form_prospects","operationType":"update","requestId":"99","showPrompt":null,"data":{"id_sector":4,"name_short":"RM Procurement Planning","id_company":94,"id":308,"id_product":5,"id_accounting_code":4,"id_type":4,"id_office":1,"description":"Replacement of existing Excel tool by DB-WebUI software for management of raw materials procurement, shipping and inventory","countryDisplay":"TR - Turkey","id_source":null,"id_person_owners":"[3]","name_long":"Raw materials procurement planning","sneak":"id:308","id_person_contributors":"[3],[8],[38]"},"oldValues":{"name_short":"RM Procurement Planning","id_sector":4,"id":308,"id_company":94,"id_product":5,"id_accounting_code":4,"id_type":4,"description":"Replacement of existing Excel tool by DB-WebUI software for management of raw materials procurement, shipping and inventory","id_office":1,"countryDisplay":"TR - Turkey","id_source":1,"id_person_owners":"[3]","sneak":"id:308","name_long":"Raw materials procurement planning","id_person_contributors":"[3],[8],[38]"}}' === 2013-02-17 16:37:54,291 [l0-5] DEBUG RestRequestParser - Parameter:'isc_dataFormat'. Value:'json'. === 2013-02-17 16:37:54,292 [l0-5] INFO RESTHandler - Performing 1 operation(s) === 2013-02-17 16:37:54,293 [l0-5] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null === 2013-02-17 16:37:54,293 [l0-5] DEBUG DeclarativeSecurity - DataSource ui_form_prospects is not in the pre-checked list, processing... === 2013-02-17 16:37:54,293 [l0-5] DEBUG AppBase - [builtinApplication.ui_form_prospects_update] No userTypes defined, allowing anyone access to all operations for this application === 2013-02-17 16:37:54,293 [l0-5] DEBUG AppBase - [builtinApplication.ui_form_prospects_update] No public zero-argument method named '_ui_form_prospects_update' found, performing generic datasource operation === 2013-02-17 16:37:54,293 [l0-5] INFO SQLDataSource - [builtinApplication.ui_form_prospects_update] Performing update operation with criteria: {id:308} values: {id_sector:4,name_short:"RM Procurement Planning",id_company:94,id:308,id_product:5,id_accounting_code:4,id_type:4,id_office:1,description:"Replacement of existing Excel tool by DB-WebUI software for management of raw materials procurement, shipping and inventory",countryDisplay:"TR - Turkey",id_person_owners:"[3]",name_long:"Raw materials procurement planning",sneak:"id:308",id_person_contributors:"[3],[8],[38]"} === 2013-02-17 16:37:54,294 [l0-5] INFO SQLValuesClause - [builtinApplication.ui_form_prospects_update] Ignored data for non-existent or included columns: [countryDisplay, id_person_owners, sneak, id_person_contributors] === 2013-02-17 16:37:54,295 [l0-5] DEBUG PoolableSQLConnectionFactory - [builtinApplication.ui_form_prospects_update] Executing pingTest 'select 1 from dual' on connection 1340666382 === 2013-02-17 16:37:54,295 [l0-5] DEBUG SQLConnectionManager - [builtinApplication.ui_form_prospects_update] Returning borrowed connection '1340666382' === 2013-02-17 16:37:54,295 [l0-5] DEBUG SQLTransaction - [builtinApplication.ui_form_prospects_update] Started new Mysql transaction "1340666382" === 2013-02-17 16:37:54,295 [l0-5] DEBUG SQLDriver - [builtinApplication.ui_form_prospects_update] About to execute SQL update in 'Mysql' using connection'1340666382' === 2013-02-17 16:37:54,295 [l0-5] INFO SQLDriver - [builtinApplication.ui_form_prospects_update] Executing SQL update on 'Mysql': UPDATE ui_form_prospects SET description='Replacement of existing Excel tool by DB-WebUI software for management of raw materials procurement, shipping and inventory', id_accounting_code=4, id_company=94, id_office=1, id_product=5, id_sector=4, id_type=4, name_long='Raw materials procurement planning', name_short='RM Procurement Planning' WHERE (ui_form_prospects.id=308)
Comment