v8.3p_2012-12-15/PowerEdition Deployment (built 2012-12-15)
Seems like listGrid.getFilterEditorCriteria(true) produces incorrect (or incompatible with HibernateDataSource) criteria.
============== Additional details (not needed to understand the problem)======================
Seems like listGrid.getFilterEditorCriteria(true) produces incorrect (or incompatible with HibernateDataSource) criteria.
Code:
listGrid.filterData(listGrid.getFilterEditorCriteria(true));
Code:
=== 2012-12-16 16:51:52,014 [l0-5] DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:[b]{ lastName:"John", firstName:"William", operator:"and", criteria:[ { _constructor:"AdvancedCriteria", operator:"and", criteria:[ { fieldName:"datebirth", operator:"greaterOrEqual", value:new Date(1354996800000) }, { fieldName:"datebirth", operator:"lessOrEqual", value:new Date(1356292799000) } ] } ] }[/b], operationConfig:{ dataSource:"users", operationType:"fetch", textMatchStyle:"substring" }, startRow:0, endRow:75, componentId:"isc_EtgListGrid_0", appID:"builtinApplication", operation:"listFetch", oldValues:{ lastName:"John", firstName:"William", operator:"and", criteria:[ { _constructor:"AdvancedCriteria", operator:"and", criteria:[ { fieldName:"datebirth", operator:"greaterOrEqual", value:new Date(1354996800000) }, { fieldName:"datebirth", operator:"lessOrEqual", value:new Date(1356292799000) } ] } ] } } === 2012-12-16 16:51:52,014 [l0-5] INFO IDACall - Performing 1 operation(s) === 2012-12-16 16:51:52,020 [l0-5] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null === 2012-12-16 16:51:52,020 [l0-5] DEBUG DeclarativeSecurity - DataSource users is not in the pre-checked list, processing... === 2012-12-16 16:51:52,020 [l0-5] DEBUG DeclarativeSecurity - Processing security checks for DataSource departments, field name === 2012-12-16 16:51:52,020 [l0-5] DEBUG DeclarativeSecurity - DataSource departments is not in the pre-checked list, processing... === 2012-12-16 16:51:52,020 [l0-5] DEBUG DeclarativeSecurity - Processing security checks for DataSource rubSections, field name === 2012-12-16 16:51:52,020 [l0-5] DEBUG DeclarativeSecurity - DataSource rubSections is not in the pre-checked list, processing... === 2012-12-16 16:51:52,021 [l0-5] DEBUG AppBase - [builtinApplication.listFetch] No userTypes defined, allowing anyone access to all operations for this application === 2012-12-16 16:51:52,021 [l0-5] DEBUG AppBase - [builtinApplication.listFetch] No public zero-argument method named '_listFetch' found, performing generic datasource operation === 2012-12-16 16:51:52,021 [l0-5] INFO HibernateDataSource - [builtinApplication.listFetch] Performing fetch operation with criteria: {lastName:"John",firstName:"William",operator:"and",criteria:[{_constructor:"AdvancedCriteria",operator:"and",criteria:[{fieldName:"datebirth",operator:"greaterOrEqual",value:new Date(1354996800000)},{fieldName:"datebirth",operator:"lessOrEqual",value:new Date(1356292799000)}]}]} values: {lastName:"John",firstName:"William",operator:"and",criteria:[{_constructor:"AdvancedCriteria",operator:"and",criteria:[{fieldName:"datebirth",operator:"greaterOrEqual",value:new Date(1354996800000)},{fieldName:"datebirth",operator:"lessOrEqual",value:new Date(1356292799000)}]}]} === 2012-12-16 16:51:52,027 [l0-5] DEBUG HibernateTransaction - [builtinApplication.listFetch] Started new transaction "577869981" [b]=== 2012-12-16 16:51:52,027 [l0-5] WARN HibernateDataSource - [builtinApplication.listFetch] Field name: 'operator' specified in criteria is not defined in data source. Skipping. === 2012-12-16 16:51:52,027 [l0-5] WARN HibernateDataSource - [builtinApplication.listFetch] Field name: 'criteria' specified in criteria is not defined in data source. Skipping.[/b] === 2012-12-16 16:51:52,027 [l0-5] INFO HibernateDataSource - [builtinApplication.listFetch] Query string: select _User, position1, department2 from ru.eurotechnologygroup.etgcrm.server.model.User _User left outer join _User.position position1 left outer join _User.department department2 where (lower(_User.lastName) like lower(:p0) escape '~') and (lower(_User.firstName) like lower(:p1) escape '~') === 2012-12-16 16:51:52,035 [l0-5] DEBUG HibernateDataSource - [builtinApplication.listFetch] Parameter p0: %John% === 2012-12-16 16:51:52,035 [l0-5] DEBUG HibernateDataSource - [builtinApplication.listFetch] Parameter p1: %William% === 2012-12-16 16:51:52,035 [l0-5] DEBUG SQL - select count(*) as col_0_0_ from suser user0_ where (lower(user0_.USERLASTNAME) like lower(?) escape '~') and (lower(user0_.USERFIRSNAME) like lower(?) escape '~') === 2012-12-16 16:51:52,047 [l0-5] DEBUG SQL - select top 75 user0_.USERID as USERID0_0_, rubsection1_.RSID as RSID9_1_, department2_.DID as DID4_2_, user0_.USERBLOCKED as USERBLOC2_0_0_, user0_.USERDATEBIRTH as USERDATE3_0_0_, user0_.DID as DID0_0_, user0_.USEREMAIL as USEREMAIL0_0_, user0_.USERFIRSNAME as USERFIRS5_0_0_, user0_.USERLASTNAME as USERLAST6_0_0_, user0_.USERLOGIN as USERLOGIN0_0_, user0_.USERMASKIP as USERMASKIP0_0_, user0_.USERPASSWORD as USERPASS9_0_0_, user0_.USERPHONE as USERPHONE0_0_, user0_.USERPOSTRSID as USERPOS14_0_0_, user0_.USERPATRONYMIC as USERPAT11_0_0_, user0_.USERWARRANT as USERWAR12_0_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_, department2_.ddeleted as ddeleted4_2_, department2_.DNAME as DNAME4_2_, department2_.dparid as dparid4_2_ from suser user0_ left outer join rubsection rubsection1_ on user0_.USERPOSTRSID=rubsection1_.RSID left outer join department department2_ on user0_.DID=department2_.DID where (lower(user0_.USERLASTNAME) like lower(?) escape '~') and (lower(user0_.USERFIRSNAME) like lower(?) escape '~') === 2012-12-16 16:51:52,065 [l0-5] INFO DSResponse - [builtinApplication.listFetch] DSResponse: List with 2 items
============== Additional details (not needed to understand the problem)======================
Code:
<DataSource ID="users" serverType="hibernate" beanClassName="ru.eurotechnologygroup.etgcrm.server.model.User" schemaBean="ru.eurotechnologygroup.etgcrm.server.model.User" allowAdvancedCriteria="true"> <fields> ... <field name="lastName" required="true"/> <field name="firstName"/> <field name="datebirth" dateFormatter="toEuropeanShortDate"/> ... </fields> </DataSource>
Code:
@Entity @Table(name = "suser") public class User implements Serializable { private Long id; private Date datebirth; private String firstName; private String lastName; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "USERID") public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name = "USERDATEBIRTH") public Date getDatebirth() { return datebirth; } public void setDatebirth(Date datebirth) { this.datebirth = datebirth; } @Column(name = "USERFIRSNAME") public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } @Column(name = "USERLASTNAME") public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } }
Comment