Hello All,
Noticed a problem with the set Max Results method on the get named query method of session. It executes fine and generates sql if I dont
call the max results method. Just thought I should flag it up somewhere.
Cheers,
Ben
Hibernate version:
hibernate 3.5
Mapping documents:
<hibernate-mapping>
<class name="com.du.ezmarket.business.marketbasket.MarketBasketImpl" table="tblmarketbasket">
<id name="baseId" column="id">
</id>
<property name="name" />
<property name="description"/>
</class>
<sql-query name="findBasketsByHeaderId">
<return alias="marketbasket" class="com.du.ezmarket.business.marketbasket.MarketBasketImpl"/>
SELECT
tblmarketbasket.ID AS {marketbasket.baseId},
tblmarketbasket.NAME AS {marketbasket.name},
tblmarketbasket.description AS {marketbasket.description}
FROM tblmarketbasket WHERE tblmarketbasket.FK_AUCTIONHEADERID=10001
</sql-query>
</hibernate-mapping>
Full stack trace of any exception that occurs:
[08/06/05 14:42:26:656 GMT] 47f847f8 SystemErr R java.lang.StringIndexOutOfBoundsException: String index out of range: -1
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at java.lang.Throwable.<init>(Throwable.java)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at java.lang.Throwable.<init>(Throwable.java:68)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at java.lang.StringIndexOutOfBoundsException.<init>(StringIndexOutOfBoundsException.java:67)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at java.lang.String.substring(String.java)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.dialect.DB2Dialect.getLimitString(DB2Dialect.java:200)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.dialect.Dialect.getLimitString(Dialect.java:581)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1073)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.loader.Loader.doQuery(Loader.java:365)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:206)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.loader.Loader.doList(Loader.java:1515)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.loader.Loader.list(Loader.java:1498)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:103)
[08/06/05 14:42:26:687 GMT] 47f847f8 SystemErr R at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1340)
[08/06/05 14:42:26:703 GMT] 47f847f8 SystemErr R at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:151)
Name and version of the database you are using:
DB2
The generated SQL (show_sql=true):
None it did not get that far
[code][/code]
|