Hi Isomorphic,
I am trying to add two rows at once in current 5.1p with a List feeded to serverside dsRequest.setValues():
Code excerpt:
productEntries is this (displayed in Eclipse debug mode):
I have built a similar testcase for supplyItem, but it is working there, so I'm a bit confused now.
In my application, when stepping through the program, I get this in the server log after leadProductAddRequest.execute():
So as you can see, it is working, but only adding 1 row, instead of 2.
I do not know where this warning above comes from - it does not happen in the testcase (did not include it, as it is working there).
Could you look up what triggers the warning? I can then either fix my usage or make the testcase fail as well.
Thank you & Best regards
Blama
I am trying to add two rows at once in current 5.1p with a List feeded to serverside dsRequest.setValues():
Code excerpt:
Code:
List<Map<String, Object>> productEntries = getLeadProductList(request.getValues(), newLeadId); if (productEntries.size() > 0) { DSRequest leadProductAddRequest = new DSRequest(ServerDatasourceEnum.T_LEAD_PRODUCTINTEREST.getValue(), DataSource.OP_ADD, request.getRPCManager()); leadProductAddRequest.setValues(productEntries); DSResponse leadProductAddResponse = leadProductAddRequest.execute(); if (leadProductAddResponse.statusIsError()) return new DSResponse().setFailure(String.format(I18n.getString("errorWritingProductDataForRow", servletRequest), currentRow)); }
Code:
[{LEAD_ID=2773, ISFILTER=false, PRODUCT_ID=29}, {LEAD_ID=2773, ISFILTER=false, PRODUCT_ID=32}]
In my application, when stepping through the program, I get this in the server log after leadProductAddRequest.execute():
Code:
=== 2016-04-05 01:21:55,759 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list. [B]=== 2016-04-05 01:21:55,760 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list. === 2016-04-05 01:21:55,761 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list. === 2016-04-05 01:21:55,762 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list. === 2016-04-05 01:21:55,763 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list. === 2016-04-05 01:21:55,764 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list. === 2016-04-05 01:21:55,764 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list. === 2016-04-05 01:21:55,765 [c-10] WARN DSRequest - getValues() called on dsRequest containing multiple sets of values, returning first in list.[/B] === 2016-04-05 01:21:55,766 [c-10] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application === 2016-04-05 01:21:55,767 [c-10] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation === 2016-04-05 01:21:55,775 [c-10] WARN DSRequest - [builtinApplication.null] getValues() called on dsRequest containing multiple sets of values, returning first in list. === 2016-04-05 01:21:55,788 [c-10] INFO SQLDataSource - [builtinApplication.null] Performing add operation with criteria: {CREATED_BY:"1083",MODIFIED_AT:new Date(1459812075960),LEAD_ID:2773,ISFILTER:false,CREATED_AT:new Date(1459812075960),MODIFIED_BY:"1083",PRODUCT_ID:"29"} values: {CREATED_BY:"1083",MODIFIED_AT:new Date(1459812075960),LEAD_ID:2773,ISFILTER:false,CREATED_AT:new Date(1459812075960),MODIFIED_BY:"1083",PRODUCT_ID:29,TENANT_ID:1} === 2016-04-05 01:21:55,792 [c-10] DEBUG SQLValuesClause - [builtinApplication.null] Sequences: {ID=__default} === 2016-04-05 01:21:55,798 [c-10] DEBUG SQLDataSource - [builtinApplication.null] Setting DSRequest as being part of a transaction === 2016-04-05 01:21:55,799 [c-10] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'Oracle' using connection '662124990': INSERT INTO T_LEAD_PRODUCTINTEREST (CREATED_AT, CREATED_BY, ISFILTER, LEAD_ID, MODIFIED_AT, MODIFIED_BY, PRODUCT_ID, TENANT_ID, ID) VALUES (TO_DATE('2016-04-05 01:21:15','YYYY-MM-DD HH24:MI:SS'), '1083', 'N', 2773, TO_DATE('2016-04-05 01:21:15','YYYY-MM-DD HH24:MI:SS'), '1083', 29, 1, T_LEAD_PRODUCTINTEREST_ID.NextVal) === 2016-04-05 01:21:55,803 [c-10] DEBUG SQLDriver - [builtinApplication.null] SequenceMode is not JDBC_DRIVER, skipping search for generated values === 2016-04-05 01:21:55,803 [c-10] DEBUG SQLDataSource - [builtinApplication.null] add operation affected 1 rows === 2016-04-05 01:21:55,804 [c-10] DEBUG SQLDataSource - [builtinApplication.null] Setting DSRequest as being part of a transaction === 2016-04-05 01:21:55,804 [c-10] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'Oracle' using connection '662124990': SELECT T_LEAD_PRODUCTINTEREST_ID.CurrVal FROM DUAL === 2016-04-05 01:21:55,806 [c-10] INFO SQLDataSource - [builtinApplication.null] primaryKeys: {ID=2573} === 2016-04-05 01:21:55,807 [c-10] DEBUG AppBase - [builtinApplication.null, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application === 2016-04-05 01:21:55,808 [c-10] DEBUG AppBase - [builtinApplication.null, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation === 2016-04-05 01:21:55,813 [c-10] INFO SQLDataSource - [builtinApplication.null, builtinApplication.null] Performing fetch operation with criteria: {TENANT_ID:1,ID:"2573"} values: {TENANT_ID:1,ID:"2573"} === 2016-04-05 01:21:55,816 [c-10] INFO SQLDataSource - [builtinApplication.null, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause === 2016-04-05 01:21:55,818 [c-10] DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] JDBC driver windowed select rows 0->-1, result size 1. Query: SELECT T_LEAD_PRODUCTINTEREST.ID, T_LEAD_PRODUCTINTEREST.TENANT_ID, T_LEAD_PRODUCTINTEREST.CREATED_BY, T_LEAD_PRODUCTINTEREST.CREATED_AT, T_LEAD_PRODUCTINTEREST.MODIFIED_BY, T_LEAD_PRODUCTINTEREST.MODIFIED_AT, T_LEAD_PRODUCTINTEREST.LEAD_ID, T_LEAD_PRODUCTINTEREST.PRODUCT_ID, T_LEAD_PRODUCTINTEREST.ISFILTER FROM T_LEAD_PRODUCTINTEREST WHERE (T_LEAD_PRODUCTINTEREST.TENANT_ID=1 AND T_LEAD_PRODUCTINTEREST.ID=2573) === 2016-04-05 01:21:55,818 [c-10] DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] Setting DSRequest as being part of a transaction === 2016-04-05 01:21:55,820 [c-10] DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] Using paging strategy 'jdbcScroll' - scrolling to absolute position 1 === 2016-04-05 01:21:55,822 [c-10] DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] Scrolling / positioning took 2ms === 2016-04-05 01:21:55,824 [c-10] INFO DSResponse - [builtinApplication.null] DSResponse: List with 1 items === 2016-04-05 01:21:55,824 [c-10] INFO DSResponse - DSResponse: List with 1 items
I do not know where this warning above comes from - it does not happen in the testcase (did not include it, as it is working there).
Could you look up what triggers the warning? I can then either fix my usage or make the testcase fail as well.
Thank you & Best regards
Blama
Comment