Announcement Announcement Module
Collapse
No announcement yet.
mysql and subselect fetching Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • mysql and subselect fetching

    Disclaimer: I know this problem is Hibernate specific but I didn't find any reponse on the forum (there is topic reported since May in there unanswered : http://forum.hibernate.org/viewtopic...asc&highlight=)

    Conf: Spring 1.2.2, HN 3.0.5, MySQL 4.1.12, mysql-jdbc-3.1.10
    When using subselect as a fetching strategy to a collection inside a hb mapping I get the following exception:

    org.hibernate.exception.GenericJDBCException: could not load collection by subselect:
    ....
    Caused by: java.sql.SQLException: Statement parameter 1 not set.
    at com.mysql.jdbc.ServerPreparedStatement.serverExecu te(ServerPreparedStatement.java:1277)
    at com.mysql.jdbc.ServerPreparedStatement.executeInte rnal(ServerPreparedStatement.java:952)
    at com.mysql.jdbc.PreparedStatement.executeQuery(Prep aredStatement.java:1722)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement .executeQuery(NewProxyPreparedStatement.java:75)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(Ab stractBatcher.java:120)
    at org.hibernate.loader.Loader.getResultSet(Loader.ja va:1272)
    at org.hibernate.loader.Loader.doQuery(Loader.java:39 1)
    at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:218)
    at org.hibernate.loader.Loader.loadCollectionSubselec t(Loader.java:1506)
    Has anyone here encounter this problem and found a solution (other then disabling subselect fetching)?

    Thanks.
Working...
X