v8.3p_2012-12-12/PowerEdition Deployment (built 2012-12-12)
I'm trying to SelectOtherItem.setPickListCriteria() and facing two problems:
1. When i try
I get
You can see that select statement performs LIKE comparison with "318%" value. From my point of view there should not be LIKE-comparison on Long value (it's long in dataSource definition).
But ok, i'm switching to AdvancedCriteria and facing the problem №2
2. I try
and i get in my datasource
req.getCriteria()
That's ok, but
req.getAdvancedCriteria()
and
req.getAdvancedCriteria().getCriteriaAsMap()
TY.
I'm trying to SelectOtherItem.setPickListCriteria() and facing two problems:
1. When i try
Code:
Criteria cr = new Criteria(); cr.addCriteria("rubricatorId", rubId); //Long select.setPickListCriteria(cr);
Code:
=== 2012-12-13 10:58:47,028 [l0-5] DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:{ rubricatorId:318 }, operationConfig:{ dataSource:"rubSections", operationType:"fetch", textMatchStyle:"startsWith" }, startRow:0, endRow:75, componentId:"isc_PickListMenu_0", appID:"builtinApplication", operation:"rubSections_fetch", oldValues:{ rubricatorId:318 } } ... === 2012-12-13 10:58:47,034 [l0-5] INFO HibernateDataSource - [builtinApplication.rubSections_fetch] Query string: select _RubSection, parent1 from ru.eurotechnologygroup.etgcrm.server.model.RubSection _RubSection left outer join _RubSection.parent parent1 where (lower(concat(_RubSection.rubricatorId,'')) like lower(:p0) escape '~') === 2012-12-13 10:58:47,045 [l0-5] DEBUG HibernateDataSource - [builtinApplication.rubSections_fetch] Parameter p0: [b]318%[/b] === 2012-12-13 10:58:47,045 [l0-5] DEBUG SQL - select count(*) as col_0_0_ from rubsection rubsection0_ where lower((rubsection0_.RUBID+'')) like lower(?) escape '~' === 2012-12-13 10:58:47,060 [l0-5] DEBUG SQL - select top 75 rubsection0_.RSID as RSID9_0_, rubsection1_.RSID as RSID9_1_, rubsection0_.RSHIDDEN as RSHIDDEN9_0_, rubsection0_.RSNAME as RSNAME9_0_, rubsection0_.RSNAMEADD as RSNAMEADD9_0_, rubsection0_.RSPARENTID as RSPARENTID9_0_, rubsection0_.RUBID as RUBID9_0_, rubsection1_.RSHIDDEN as RSHIDDEN9_1_, rubsection1_.RSNAME as RSNAME9_1_, rubsection1_.RSNAMEADD as RSNAMEADD9_1_, rubsection1_.RSPARENTID as RSPARENTID9_1_, rubsection1_.RUBID as RUBID9_1_ from rubsection rubsection0_ left outer join rubsection rubsection1_ on rubsection0_.RSPARENTID=rubsection1_.RSID where lower((rubsection0_.RUBID+'')) like lower(?) escape '~' === 2012-12-13 10:58:47,072 [l0-5] INFO DSResponse - [builtinApplication.rubSections_fetch] DSResponse: List with 4 items
But ok, i'm switching to AdvancedCriteria and facing the problem №2
2. I try
Code:
AdvancedCriteria cr = new AdvancedCriteria(); cr.addCriteria("rubricatorId", rubId); cr.setOperator(OperatorId.EQUALS); select.setPickListCriteria(cr);
req.getCriteria()
Code:
req.getCriteria() = {java.util.HashMap@9730} size = 3 [0] = {java.util.HashMap$Entry@9734}"criteria" -> size = 1 key: java.lang.String = {java.lang.String@9736}"criteria" value: java.util.ArrayList = {java.util.ArrayList@9737} size = 1 [0] = {org.apache.commons.collections.map.LinkedMap@9745} size = 3 [0] = {org.apache.commons.collections.map.AbstractLinkedMap$LinkEntry@9748}"_constructor" -> "AdvancedCriteria" [1] = {org.apache.commons.collections.map.AbstractLinkedMap$LinkEntry@9750}"rubricatorId" -> "318" [2] = {org.apache.commons.collections.map.AbstractLinkedMap$LinkEntry@11210}"operator" -> "equals" [1] = {java.util.HashMap$Entry@9738}"operator" -> "and" [2] = {java.util.HashMap$Entry@9741}"_constructor" -> "AdvancedCriteria"
req.getAdvancedCriteria()
Code:
AdvancedCriteria:[and:[null]]
req.getAdvancedCriteria().getCriteriaAsMap()
Code:
java.lang.NullPointerException
Comment