hi,
i have a problem with the method DataSource.fetchSingle().
According to the javadoc, I would expect that only the first record is returned. So "fetch first row only" but I get the following exception.
best regards,
mirko
i used: Isomorphic SmartClient/SmartGWT Framework (v9.0p_2013-08-09/PowerEdition Deployment 2013-08-09)
i have a problem with the method DataSource.fetchSingle().
Code:
DataSource dataSource = DataSourceManager.get("supplyItem"); dataSource.fetchSingle("units", "Roll");
Code:
=== 2013-08-12 17:53:22,559 [l0-6] DEBUG SQLDriver - [builtinApplication.null] About to execute SQL query in 'HSQLDB' using connection '769859113' === 2013-08-12 17:53:22,560 [l0-6] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'HSQLDB': SELECT supplyItem.SKU, supplyItem.category, supplyItem.description, supplyItem.inStock, supplyItem.itemID, supplyItem.itemName, supplyItem.nextShipment, supplyItem.unitCost, supplyItem.units FROM supplyItem WHERE (supplyItem.units='Roll') === 2013-08-12 17:53:22,634 [l0-6] INFO DSResponse - [builtinApplication.null] DSResponse: List with 75 items === 2013-08-12 17:53:22,635 [l0-6] DEBUG SQLDriver - Freeing SQLDriver dbConnection 769859113 === 2013-08-12 17:53:22,636 [l0-6] DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "769859113" [WARN] /customds//supplyItemOperations.rpc java.lang.Exception: Fetched multiple results when trying single at com.isomorphic.datasource.DataSource.forceSingle(DataSource.java:2982) at com.isomorphic.datasource.DataSource.fetchSingle(DataSource.java:2874) at com.smartgwt.sample.server.SupplyItemOperationsController.handleRequest(SupplyItemOperationsController.java:35)
best regards,
mirko
i used: Isomorphic SmartClient/SmartGWT Framework (v9.0p_2013-08-09/PowerEdition Deployment 2013-08-09)
Comment