Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Cartesian join caused by DataSourceField includeFrom

    Given a datasource with a field declared like this

    Code:
    <field name="ORDERID" canEdit="false" required="true" foreignKey="Order.ORDERID"/>
    <field name="CUSTOMERNAME" includeFrom="Order.CUSTOMERNAME"/>
    And a listgrid that fetches all rows (i.e., no explicit criteria is defined)
    Code:
    grid.setDataSource(DataSource.get("OrderItem"));
    grid.setAutoFetchData(true);
    the framework generates a cartesian join for calculating the number of rows
    Code:
    SELECT COUNT(*) FROM MASTERDETAIL_ORDERITEM, MASTERDETAIL_ORDER WHERE ('1'='1')
    Tested with 3.0-RELEASE and various nightlies through 3.1-2011-12-22.
    Last edited by bbruyn; 23 Dec 2011, 09:38.

    #2
    Hmm this isn't showing up in our tests and samples. You *can* get a Cartesian join if there's something wrong with the foreignKey declaration, such as incorrect capitalization on the DataSource ID or fieldName. Could you show the rest of the declaration, and the server logs?

    Comment


      #3
      I don't think that's it, but I have been wrong before. FWIW, this particular example can be seen in the maven archetype up on the wiki. Just change the grid's datasource to OrderItem.

      Meanwhile, the DataSources:

      Code:
      <DataSource xmlns:fmt="urn:jsptld:http://java.sun.com/jsp/jstl/fmt"
          ID="Order"  
          serverType="sql"
          autoDeriveSchema="true"
          tableName="MASTERDETAIL_ORDER" >  
          
          <fmt:setBundle basename="com.isomorphic.cartesian.shared.datasources.Order"/>
          
          <fields>  
              <field name="ORDERID" type="sequence" primaryKey="true" canEdit="false">
                  <title><fmt:message key="orderId.title"/></title>
                  <prompt><fmt:message key="orderId.prompt"/></prompt>
              </field>
              <field name="CUSTOMERNAME">
                  <title><fmt:message key="customerName.title"/></title>
                  <prompt><fmt:message key="customerName.prompt"/></prompt>
              </field>
              <field name="ORDERDATE">
                  <title><fmt:message key="orderDate.title"/></title>
                  <prompt><fmt:message key="orderDate.prompt"/></prompt>
              </field>
              <field name="TRACKINGNUMBER">
                  <title><fmt:message key="trackingNumber.title"/></title>
                  <prompt><fmt:message key="trackingNumber.prompt"/></prompt>
              </field>
          </fields>  
            
      </DataSource>
      Code:
      <DataSource xmlns:fmt="urn:jsptld:http://java.sun.com/jsp/jstl/fmt"
          ID="OrderItem"
          serverType="sql"
          autoDeriveSchema="true"
          tableName="MASTERDETAIL_ORDERITEM">
          
          <fields>
              
              <fmt:setBundle basename="com.isomorphic.cartesian.shared.datasources.OrderItem"/>
              <field name="PK" type="sequence" primaryKey="true" hidden="true">
                  <title><fmt:message key="itemId.title"/></title>
                  <prompt><fmt:message key="itemId.prompt"/></prompt>
              </field>
              <field name="ORDERID" canEdit="false" required="true" foreignKey="Order.ORDERID">
                  <title><fmt:message key="orderId.title"/></title>
                  <prompt><fmt:message key="orderId.prompt"/></prompt>
              </field>
      
              <fmt:setBundle basename="com.isomorphic.cartesian.shared.datasources.Order"/>
              <field name="CUSTOMERNAME" includeFrom="Order.CUSTOMERNAME">
                  <title><fmt:message key="customerName.title"/></title>
                  <prompt><fmt:message key="customerName.prompt"/></prompt>
              </field>
      
              <fmt:setBundle basename="com.isomorphic.cartesian.shared.datasources.OrderItem"/>
              <field name="ITEMDESCRIPTION" required="true">
                  <title><fmt:message key="itemDescription.title"/></title>
                  <prompt><fmt:message key="itemDescription.prompt"/></prompt>
              </field>
              <field name="QUANTITY" required="true">
                  <title><fmt:message key="quantity.title"/></title>
                  <prompt><fmt:message key="quantity.prompt"/></prompt>
              </field>
              <field name="UNITPRICE" required="true">
                  <title><fmt:message key="unitPrice.title"/></title>
                  <prompt><fmt:message key="unitPrice.prompt"/></prompt>
              </field>
              
          </fields>
          
      </DataSource>
      The log:

      Code:
      [Server@168f6724]: [Thread[main,5,main]]: checkRunning(false) entered
      [Server@168f6724]: [Thread[main,5,main]]: checkRunning(false) exited
      [Server@168f6724]: Startup sequence initiated from main() method
      [Server@168f6724]: Loaded properties from [C:\Development\workspace\cartesian\target\cartesian-0.0.1-SNAPSHOT\server.properties]
      [Server@168f6724]: Initiating startup sequence...
      [Server@168f6724]: Server socket opened successfully in 3 ms.
      [Server@168f6724]: Database [index=0, id=0, db=file:C:\Development\workspace\cartesian\target\cartesian-0.0.1-SNAPSHOT\WEB-INF\db\hsqldb\isomorphic, alias=isomorphic] opened sucessfully in 1914 ms.
      [Server@168f6724]: Startup sequence completed in 1918 ms.
      [Server@168f6724]: 2011-12-23 15:31:05.294 HSQLDB server 1.8.0 is online
      [Server@168f6724]: To close normally, connect and execute SHUTDOWN SQL
      [Server@168f6724]: From command line, use [Ctrl]+[C] to abort abruptly
      ISC: Configuring log4j from: file:/C:/Development/workspace/cartesian/target/cartesian-0.0.1-SNAPSHOT/WEB-INF/classes/log4j.isc.config.xml
      === 2011-12-23 15:31:05,404 [main] INFO  ISCInit - Isomorphic SmartClient Framework - Initializing
      === 2011-12-23 15:31:05,404 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
      === 2011-12-23 15:31:05,561 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/Development/workspace/cartesian/target/cartesian-0.0.1-SNAPSHOT/WEB-INF/lib/isomorphic-core-rpc-3.1-2011-12-22.jar!/framework.properties
      === 2011-12-23 15:31:05,561 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
      === 2011-12-23 15:31:05,561 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
      === 2011-12-23 15:31:05,561 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/C:/Development/workspace/cartesian/target/cartesian-0.0.1-SNAPSHOT/WEB-INF/lib/isomorphic-core-rpc-3.1-2011-12-22.jar!/isc_interfaces.properties
      === 2011-12-23 15:31:05,561 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
      === 2011-12-23 15:31:05,561 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/C:/Development/workspace/cartesian/target/cartesian-0.0.1-SNAPSHOT/WEB-INF/classes/server.properties
      === 2011-12-23 15:31:05,577 [main] INFO  Logger - Logging system started.
      === 2011-12-23 15:31:05,577 [main] INFO  ISCInit - Isomorphic SmartClient Framework (SC_SNAPSHOT-2011-12-22/PowerEdition Deployment 2011-12-22) - Initialization Complete
      === 2011-12-23 15:31:05,577 [main] ERROR ISCInit - Can't find marker file for webRoot: C:/Development/workspace/cartesian/target/cartesian-0.0.1-SNAPSHOT/CartesianTestCase/sc for configured/autodetected webRoot - if you moved the 'isomorphic' directory, please set isomorphicPathRootRelative in server.properties to the new location and restart the servlet engine.
      === 2011-12-23 15:31:05,577 [main] INFO  ISCInit - WebRoot auto-detection failed - using container IO
      log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
      log4j:WARN Please initialize the log4j system properly.
      log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
      === 2011-12-23 15:33:42,327 [l0-1] INFO  RequestContext - URL: '/CartesianTestCase.html', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,328 [l0-1] INFO  Compression - /CartesianTestCase.html: 2264 -> 921 bytes
      === 2011-12-23 15:33:42,328 [l0-1] DEBUG ServletTools - setting cookie 'isc_cState' to: 'ready'
      === 2011-12-23 15:33:42,531 [l0-1] INFO  RequestContext - URL: '/CartesianTestCase.css', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,531 [l0-3] INFO  RequestContext - URL: '/loadDataSources.jsp', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,547 [l0-1] INFO  Compression - /CartesianTestCase.css: 47 -> 67 bytes
      === 2011-12-23 15:33:42,547 [l0-2] INFO  RequestContext - URL: '/CartesianTestCase/CartesianTestCase.nocache.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,547 [l0-2] INFO  Compression - /CartesianTestCase/CartesianTestCase.nocache.js: 8104 -> 2700 bytes
      === 2011-12-23 15:33:42,562 [l0-2] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_Core.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,562 [l0-4] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_Containers.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,562 [l0-1] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_Foundation.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,562 [l0-5] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_Grids.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,593 [l0-4] INFO  Compression - /CartesianTestCase/sc/modules/ISC_Containers.js: 130467 -> 30902 bytes
      === 2011-12-23 15:33:42,609 [l0-4] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_RichTextEditor.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,625 [l0-4] INFO  Compression - /CartesianTestCase/sc/modules/ISC_RichTextEditor.js: 39875 -> 11120 bytes
      === 2011-12-23 15:33:42,625 [l0-4] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_Calendar.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,640 [l0-2] INFO  Compression - /CartesianTestCase/sc/modules/ISC_Core.js: 719272 -> 185206 bytes
      === 2011-12-23 15:33:42,640 [l0-2] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_DataBinding.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,656 [l0-4] INFO  Compression - /CartesianTestCase/sc/modules/ISC_Calendar.js: 104132 -> 25133 bytes
      === 2011-12-23 15:33:42,640 [l0-6] INFO  RequestContext - URL: '/CartesianTestCase/sc/modules/ISC_Forms.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,671 [l0-4] INFO  RequestContext - URL: '/CartesianTestCase/sc/initsc.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,718 [l0-4] INFO  Compression - /CartesianTestCase/sc/initsc.js: 47 -> 72 bytes
      === 2011-12-23 15:33:42,718 [l0-4] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/Enterprise/load_skin.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,718 [l0-1] INFO  Compression - /CartesianTestCase/sc/modules/ISC_Foundation.js: 235149 -> 55626 bytes
      === 2011-12-23 15:33:42,749 [l0-5] INFO  Compression - /CartesianTestCase/sc/modules/ISC_Grids.js: 752950 -> 189444 bytes
      === 2011-12-23 15:33:42,749 [l0-4] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/Enterprise/load_skin.js
      === 2011-12-23 15:33:42,749 [l0-4] INFO  Compression - /CartesianTestCase/sc/skins/Enterprise/load_skin.js: 30235 -> 6410 bytes
      === 2011-12-23 15:33:42,781 [l0-6] INFO  Compression - /CartesianTestCase/sc/modules/ISC_Forms.js: 635192 -> 154731 bytes
      === 2011-12-23 15:33:42,781 [l0-1] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/EnterpriseBlue/load_skin.js', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:42,781 [l0-2] INFO  Compression - /CartesianTestCase/sc/modules/ISC_DataBinding.js: 574373 -> 141630 bytes
      === 2011-12-23 15:33:42,812 [l0-1] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/EnterpriseBlue/load_skin.js
      === 2011-12-23 15:33:42,812 [l0-1] INFO  Compression - /CartesianTestCase/sc/skins/EnterpriseBlue/load_skin.js: 63797 -> 8924 bytes
      === 2011-12-23 15:33:43,358 [l0-1] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/Enterprise/skin_styles.css', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:43,358 [l0-1] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/Enterprise/skin_styles.css
      === 2011-12-23 15:33:43,359 [l0-1] INFO  Compression - /CartesianTestCase/sc/skins/Enterprise/skin_styles.css: 65873 -> 8768 bytes
      === 2011-12-23 15:33:43,374 [l0-1] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/EnterpriseBlue/skin_styles.css', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:43,390 [l0-1] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/EnterpriseBlue/skin_styles.css
      === 2011-12-23 15:33:43,406 [l0-1] INFO  Compression - /CartesianTestCase/sc/skins/EnterpriseBlue/skin_styles.css: 190049 -> 15395 bytes
      === 2011-12-23 15:33:45,263 [l0-3] DEBUG XML - Parsed XML from (in memory stream): 16ms
      === 2011-12-23 15:33:45,264 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/builtinTypes.xml: 0ms
      === 2011-12-23 15:33:45,279 [l0-3] INFO  PoolManager - SmartClient pooling disabled for 'simpleTypes' objects
      === 2011-12-23 15:33:45,376 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/action.ds.xml: 0ms
      === 2011-12-23 15:33:45,391 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/DataSource.ds.xml: 15ms
      === 2011-12-23 15:33:45,391 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/valueMap.ds.xml: 0ms
      === 2011-12-23 15:33:45,407 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
      === 2011-12-23 15:33:45,422 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/serverObject.ds.xml: 15ms
      === 2011-12-23 15:33:45,422 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
      === 2011-12-23 15:33:45,422 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: serverObject, but got: ServerObject
      === 2011-12-23 15:33:45,485 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/ID
      === 2011-12-23 15:33:45,500 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/DataSourceField.ds.xml: 15ms
      === 2011-12-23 15:33:45,500 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/0/field[@name=target]/name
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/0/field[@name=target]/type
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/1/field[@name=name]/name
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/1/field[@name=name]/type
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/2/field[@name=title]/name
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/2/field[@name=title]/type
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'boolean', not processing field value at /DataSource[@ID=Action]/fields/3/field[@name=mapping]/multiple
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/3/field[@name=mapping]/name
      === 2011-12-23 15:33:45,547 [l0-3] WARN  Validation - No such type 'string', not processing field value at /DataSource[@ID=Action]/fields/3/field[@name=mapping]/type
      === 2011-12-23 15:33:45,547 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: action, but got: Action
      === 2011-12-23 15:33:45,547 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/method.ds.xml: 0ms
      === 2011-12-23 15:33:45,563 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: method, but got: Method
      === 2011-12-23 15:33:45,563 [l0-3] DEBUG FileSystemDSRepo - dsName case sensitivity mismatch - looking for: valueMap, but got: ValueMap
      === 2011-12-23 15:33:45,578 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/isomorphicXML.ds.xml: 0ms
      === 2011-12-23 15:33:45,703 [l0-3] INFO  SQLDataSource - Deriving dataSource Order from table: MASTERDETAIL_ORDER
      === 2011-12-23 15:33:45,734 [l0-3] DEBUG PoolableSQLConnectionFactory - Initializing SQL config for 'CartesianTestCaseData' via JNDI
      === 2011-12-23 15:33:45,734 [l0-3] DEBUG JNDI - No configuration for JNDI context '' - assuming default initialContext
      === 2011-12-23 15:33:45,750 [l0-3] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection
      === 2011-12-23 15:33:45,766 [l0-3] INFO  SQLDSGenerator - Fetching column metadata for table: MASTERDETAIL_ORDER
      === 2011-12-23 15:33:45,766 [l0-3] INFO  SQLDSGenerator - =============Using catalog: null
      === 2011-12-23 15:33:45,812 [l0-3] INFO  SQLDSGenerator - Fetching column metadata for MASTERDETAIL_ORDER complete
      === 2011-12-23 15:33:45,812 [l0-3] WARN  SQLDataSource - ds:isc.DataSource.create({
          serverType:"sql",
          generatedBy:"SC_SNAPSHOT-2011-12-22/PowerEdition Deployment 2011-12-22",
          schema:"PUBLIC",
          dbName:null,
          ID:"Order_inheritsFrom",
          dataSourceVersion:"1",
          fields:[
              {
                  primaryKey:true,
                  name:"ORDERID",
                  type:"integer"
              },
              {
                  name:"CUSTOMERNAME",
                  length:255,
                  type:"text"
              },
              {
                  name:"ORDERDATE",
                  type:"date"
              },
              {
                  name:"TRACKINGNUMBER",
                  type:"integer"
              }
          ]
      })
      
      === 2011-12-23 15:33:45,828 [l0-3] INFO  SQLDataSource - Deriving dataSource OrderItem from table: MASTERDETAIL_ORDERITEM
      === 2011-12-23 15:33:45,828 [l0-3] DEBUG PoolableSQLConnectionFactory - Returning pooled Connection
      === 2011-12-23 15:33:45,828 [l0-3] INFO  SQLDSGenerator - Fetching column metadata for table: MASTERDETAIL_ORDERITEM
      === 2011-12-23 15:33:45,828 [l0-3] INFO  SQLDSGenerator - =============Using catalog: null
      === 2011-12-23 15:33:45,844 [l0-3] INFO  SQLDSGenerator - Fetching column metadata for MASTERDETAIL_ORDERITEM complete
      === 2011-12-23 15:33:45,844 [l0-3] WARN  SQLDataSource - ds:isc.DataSource.create({
          serverType:"sql",
          generatedBy:"SC_SNAPSHOT-2011-12-22/PowerEdition Deployment 2011-12-22",
          schema:"PUBLIC",
          dbName:null,
          ID:"OrderItem_inheritsFrom",
          dataSourceVersion:"1",
          fields:[
              {
                  primaryKey:true,
                  name:"PK",
                  type:"integer"
              },
              {
                  name:"ITEMDESCRIPTION",
                  length:255,
                  type:"text"
              },
              {
                  name:"QUANTITY",
                  type:"integer"
              },
              {
                  name:"UNITPRICE",
                  type:"float"
              },
              {
                  name:"ORDERID",
                  type:"integer"
              }
          ]
      })
      
      === 2011-12-23 15:33:45,844 [l0-3] DEBUG XML - Parsed XML from __USE_CONTAINER__/ds/Order.ds.xml: 0ms
      [WARN] Server class 'org.apache.xalan.processor.TransformerFactoryImpl' could not be found in the web app, but was found on the system classpath
         [WARN] Adding classpath entry 'file:/C:/Development/.m2/repository/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar' to the web app classpath for this session
      === 2011-12-23 15:33:45,953 [l0-3] INFO  Compression - /loadDataSources.jsp: 3733 -> 833 bytes
      === 2011-12-23 15:33:45,968 [l0-3] INFO  RequestContext - URL: '/CartesianTestCase/hosted.html', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:33:45,968 [l0-3] INFO  Compression - /CartesianTestCase/hosted.html: 11757 -> 4187 bytes
      === 2011-12-23 15:34:19,480 [l0-5] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/EnterpriseBlue/images/ListGrid/header.png', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:34:19,496 [l0-5] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/EnterpriseBlue/images/ListGrid/header.png
      === 2011-12-23 15:34:19,496 [l0-1] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/EnterpriseBlue/images/loadingSmall.gif', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:34:19,511 [l0-1] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/EnterpriseBlue/images/loadingSmall.gif
      === 2011-12-23 15:34:19,496 [l0-3] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/Enterprise/images/ListGrid/headerSprite.png', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:34:19,527 [l0-2] INFO  RequestContext - URL: '/CartesianTestCase/sc/skins/EnterpriseBlue/images/blank.gif', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:34:19,637 [l0-3] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/Enterprise/images/ListGrid/headerSprite.png
      === 2011-12-23 15:34:19,637 [l0-2] INFO  Download - done streaming: __USE_CONTAINER__/CartesianTestCase/sc/skins/EnterpriseBlue/images/blank.gif
      === 2011-12-23 15:34:19,684 [l0-2] INFO  RequestContext - URL: '/CartesianTestCase/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1': Moz (Gecko) with Accept-Encoding header
      === 2011-12-23 15:34:19,715 [l0-2] DEBUG XML - Parsed XML from (in memory stream): 0ms
      === 2011-12-23 15:34:19,731 [l0-2] DEBUG XML - Parsed XML from __USE_CONTAINER__/CartesianTestCase/sc/system/schema/List.ds.xml: 0ms
      === 2011-12-23 15:34:19,762 [l0-2] DEBUG RPCManager - Processing 1 requests.
      === 2011-12-23 15:34:19,778 [l0-2] DEBUG XML - Parsed XML from __USE_CONTAINER__/ds/OrderItem.ds.xml: 0ms
      === 2011-12-23 15:34:19,840 [l0-2] DEBUG RPCManager - Request #1 (DSRequest) payload: {
          criteria:{
          },
          operationConfig:{
              dataSource:"OrderItem",
              operationType:"fetch",
              textMatchStyle:"substring"
          },
          startRow:0,
          endRow:75,
          componentId:"isc_ListGrid_0",
          appID:"builtinApplication",
          operation:"OrderItem_fetch",
          oldValues:{
          }
      }
      === 2011-12-23 15:34:19,856 [l0-2] INFO  IDACall - Performing 1 operation(s)
      === 2011-12-23 15:34:19,871 [l0-2] DEBUG AppBase - [builtinApplication.OrderItem_fetch] No userTypes defined, allowing anyone access to all operations for this application
      === 2011-12-23 15:34:19,871 [l0-2] DEBUG AppBase - [builtinApplication.OrderItem_fetch] No public zero-argument method named '_OrderItem_fetch' found, performing generic datasource operation
      === 2011-12-23 15:34:19,887 [l0-2] INFO  SQLDataSource - [builtinApplication.OrderItem_fetch] Performing fetch operation with
      	criteria: {}	values: {}
      === 2011-12-23 15:34:19,902 [l0-2] INFO  SQLWhereClause - [builtinApplication.OrderItem_fetch] empty condition
      === 2011-12-23 15:34:19,902 [l0-2] INFO  SQLDataSource - [builtinApplication.OrderItem_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause AND $defaultJoinWhereClause
      === 2011-12-23 15:34:20,090 [l0-2] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause
      === 2011-12-23 15:34:20,090 [l0-2] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] Eval'd row count query: SELECT COUNT(*) FROM MASTERDETAIL_ORDERITEM, MASTERDETAIL_ORDER WHERE ('1'='1')
      === 2011-12-23 15:34:20,090 [l0-2] DEBUG PoolableSQLConnectionFactory - [builtinApplication.OrderItem_fetch] Returning pooled Connection
      === 2011-12-23 15:34:20,090 [l0-2] INFO  SQLDriver - [builtinApplication.OrderItem_fetch] Executing SQL query on 'CartesianTestCaseData': SELECT COUNT(*) FROM MASTERDETAIL_ORDERITEM, MASTERDETAIL_ORDER WHERE ('1'='1')
      === 2011-12-23 15:34:20,105 [l0-2] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] Using SQL Limit query
      === 2011-12-23 15:34:20,105 [l0-2] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  MASTERDETAIL_ORDERITEM.ITEMDESCRIPTION, MASTERDETAIL_ORDERITEM.ORDERID, MASTERDETAIL_ORDERITEM.PK, MASTERDETAIL_ORDERITEM.QUANTITY, MASTERDETAIL_ORDERITEM.UNITPRICE, MASTERDETAIL_ORDER.CUSTOMERNAME FROM MASTERDETAIL_ORDERITEM, MASTERDETAIL_ORDER WHERE ('1'='1') AND MASTERDETAIL_ORDER.ORDERID = MASTERDETAIL_ORDERITEM.ORDERID
      === 2011-12-23 15:34:20,105 [l0-2] DEBUG PoolableSQLConnectionFactory - [builtinApplication.OrderItem_fetch] Returning pooled Connection
      === 2011-12-23 15:34:20,105 [l0-2] INFO  DSResponse - [builtinApplication.OrderItem_fetch] DSResponse: List with 18 items
      === 2011-12-23 15:34:20,105 [l0-2] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2011-12-23 15:34:20,121 [l0-2] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      === 2011-12-23 15:34:20,152 [l0-2] INFO  Compression - /CartesianTestCase/sc/IDACall: 2360 -> 585 bytes

      Comment


        #4
        OK, we'll check this out and see if we get the same thing.

        Just to clarify, your saying this *doesn't* happen if the criteria is non-empty - then you see the expected join criteria of order.orderId = orderItem.orderId?

        Comment


          #5
          Well, no.

          Code:
          grid.setDataSource(DataSource.get("OrderItem"));
          Criteria c = new Criteria("ORDERID", "3");
          grid.fetchData(c);
          Code:
          === 2011-12-23 15:54:57,494 [l0-6] INFO  IDACall - Performing 1 operation(s)
          === 2011-12-23 15:54:57,526 [l0-6] DEBUG AppBase - [builtinApplication.OrderItem_fetch] No userTypes defined, allowing anyone access to all operations for this application
          === 2011-12-23 15:54:57,526 [l0-6] DEBUG AppBase - [builtinApplication.OrderItem_fetch] No public zero-argument method named '_OrderItem_fetch' found, performing generic datasource operation
          === 2011-12-23 15:54:57,526 [l0-6] INFO  SQLDataSource - [builtinApplication.OrderItem_fetch] Performing fetch operation with
          	criteria: {ORDERID:"3"}	values: {ORDERID:"3"}
          === 2011-12-23 15:54:57,541 [l0-6] INFO  SQLDataSource - [builtinApplication.OrderItem_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause AND $defaultJoinWhereClause
          === 2011-12-23 15:54:57,666 [l0-6] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause
          === 2011-12-23 15:54:57,666 [l0-6] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] Eval'd row count query: SELECT COUNT(*) FROM MASTERDETAIL_ORDERITEM, MASTERDETAIL_ORDER WHERE (MASTERDETAIL_ORDERITEM.ORDERID=3)
          === 2011-12-23 15:54:57,666 [l0-6] DEBUG PoolableSQLConnectionFactory - [builtinApplication.OrderItem_fetch] Returning pooled Connection
          === 2011-12-23 15:54:57,682 [l0-6] INFO  SQLDriver - [builtinApplication.OrderItem_fetch] Executing SQL query on 'CartesianTestCaseData': SELECT COUNT(*) FROM MASTERDETAIL_ORDERITEM, MASTERDETAIL_ORDER WHERE (MASTERDETAIL_ORDERITEM.ORDERID=3)
          === 2011-12-23 15:54:57,682 [l0-6] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] Using SQL Limit query
          === 2011-12-23 15:54:57,682 [l0-6] DEBUG SQLDataSource - [builtinApplication.OrderItem_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  MASTERDETAIL_ORDERITEM.ITEMDESCRIPTION, MASTERDETAIL_ORDERITEM.ORDERID, MASTERDETAIL_ORDERITEM.PK, MASTERDETAIL_ORDERITEM.QUANTITY, MASTERDETAIL_ORDERITEM.UNITPRICE, MASTERDETAIL_ORDER.CUSTOMERNAME FROM MASTERDETAIL_ORDERITEM, MASTERDETAIL_ORDER WHERE (MASTERDETAIL_ORDERITEM.ORDERID=3) AND MASTERDETAIL_ORDER.ORDERID = MASTERDETAIL_ORDERITEM.ORDERID
          === 2011-12-23 15:54:57,682 [l0-6] DEBUG PoolableSQLConnectionFactory - [builtinApplication.OrderItem_fetch] Returning pooled Connection
          === 2011-12-23 15:54:57,682 [l0-6] INFO  DSResponse - [builtinApplication.OrderItem_fetch] DSResponse: List with 5 items

          Comment


            #6
            Still see the same behavior with 3.1-2012-01-03 build...

            Comment


              #7
              This is a bug in the generation of the rowcount query. It has been fixed in the latest 8.3 build, and also in the 8.2p patched-release build. Tomorrow's nightly builds of both those versions will contain the fix. Thanks for helping us get to the bottom of this.

              Comment

              Working...
              X