I've just downloaded the 12/09 and 12/10 nightly builds of 4.1d and I'm seeing odd behavior in my application. Did something change with the way Criteria objects are handled? My application issues a request with a Criteria:
which gets passed to the server with the _constructor:AdvancedCriteria tag
And is then ignored on the server - notice the WHERE 1=1 below:
I did not see this behavior with the 11/26 build.
Code:
final DataSource usersDS = DataSource.get("Users"); usersDS.fetchData(new Criteria("Userid", user),null);
Code:
{ "actionURL":"http://beer-irv-dev01:32144/beer/sc/IDACall", "showPrompt":true, "transport":"xmlHttpRequest", "promptStyle":"cursor", "bypassCache":true, "data":{ "criteria":{ "Userid":"riiff", "_constructor":"AdvancedCriteria" }, "operationConfig":{ "dataSource":"Users", "repo":null, "operationType":"fetch" }, "appID":"builtinApplication", "operation":"Users_fetch", "oldValues":{ "Userid":"riiff", "_constructor":"AdvancedCriteria" } } }
Code:
=== 2013-12-10 10:32:14,854 [l0-3] DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:{ Userid:"riiff", _constructor:"AdvancedCriteria" }, operationConfig:{ dataSource:"Users", operationType:"fetch" }, appID:"builtinApplication", operation:"Users_fetch", oldValues:{ Userid:"riiff", _constructor:"AdvancedCriteria" } } === 2013-12-10 10:32:14,854 [l0-3] INFO IDACall - Performing 1 operation(s) === 2013-12-10 10:32:14,854 [l0-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null === 2013-12-10 10:32:14,855 [l0-3] DEBUG DeclarativeSecurity - DataSource Users is not in the pre-checked list, processing... === 2013-12-10 10:32:14,855 [l0-3] DEBUG AppBase - [builtinApplication.Users_fetch] No userTypes defined, allowing anyone access to all operations for this application === 2013-12-10 10:32:14,856 [l0-3] DEBUG AppBase - [builtinApplication.Users_fetch] No public zero-argument method named '_Users_fetch' found, performing generic datasource operation === 2013-12-10 10:32:14,856 [l0-3] INFO SQLDataSource - [builtinApplication.Users_fetch] Performing fetch operation with criteria: {Userid:"riiff",_constructor:"AdvancedCriteria"} values: {Userid:"riiff",_constructor:"AdvancedCriteria"} === 2013-12-10 10:32:14,857 [l0-3] INFO SQLDataSource - [builtinApplication.Users_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause === 2013-12-10 10:32:14,857 [l0-3] INFO SQLDataSource - [builtinApplication.Users_fetch] 1372: Executing SQL query on 'BEER': SELECT Users.AccountStatus, Users.Bus_Unit_Code, Users.Department, Users.Dept_No, Users.Email, Users.Extension, Users.FullName, Users.LOB_Abbr, Users.Location, Users.PK_Users_Userid, Users.Phone, Users.SuperUser, Users.Userid FROM Users WHERE '1'='1' === 2013-12-10 10:32:14,858 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Users_fetch] DriverManager fetching connection for BEER via jdbc url jdbc:sqlserver://db-beer.broadcom.com:1433;DatabaseName=BEER;User=SmartGWT_UI;Password=Kepler12 === 2013-12-10 10:32:14,858 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Users_fetch] Passing JDBC URL only to getConnection === 2013-12-10 10:32:14,872 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Users_fetch] makeObject() created an unpooled Connection '563330712' === 2013-12-10 10:32:14,873 [l0-3] DEBUG SQLConnectionManager - [builtinApplication.Users_fetch] Borrowed connection '563330712' === 2013-12-10 10:32:14,883 [l0-3] DEBUG SQLTransaction - [builtinApplication.Users_fetch] Started new BEER transaction "563330712" === 2013-12-10 10:32:14,884 [l0-3] DEBUG SQLDriver - [builtinApplication.Users_fetch] About to execute SQL query in 'BEER' using connection '563330712' === 2013-12-10 10:32:14,884 [l0-3] INFO SQLDriver - [builtinApplication.Users_fetch] Executing SQL query on 'BEER': SELECT Users.AccountStatus, Users.Bus_Unit_Code, Users.Department, Users.Dept_No, Users.Email, Users.Extension, Users.FullName, Users.LOB_Abbr, Users.Location, Users.PK_Users_Userid, Users.Phone, Users.SuperUser, Users.Userid FROM Users WHERE '1'='1'
Comment