Hibernate version: 3.0.5
Full stack trace of any exception that occurs:
13:44:07,486 DEBUG - ...
com.sybase.jdbc3.jdbc.SybSQLException: Too many table names in the query. The maximum allowable is 50.
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.queryLoop(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.executeQuery(Unknown Source)
at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1434)
at org.hibernate.loader.collection.OneToManyLoader.initialize(OneToManyLoader.java:111)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:488)
at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1430)
at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:280)
at org.hibernate.engine.PersistenceContext.initializeNonLazyCollections(PersistenceContext.java:796)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1322)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:300)
at test.calyon.irdedtp.fpml.Requester.retrieveAll(Requester.java:36)
at test.calyon.irdedtp.fpml.PersistenceTest.retrieveAll(PersistenceTest.java:44)
at test.calyon.irdedtp.fpml.PersistenceTest.main(PersistenceTest.java:52)
Name and version of the database you are using:
Sybase 12.5 & jConnect 6
The generated SQL (show_sql=true):
I can provide the sql on demand, but I have not included it here for clarity
Hi everybody,
I'm currently using Hyperjaxb2 to generate java classes and hibernate mapping. Everything works fine to commit my objects in the sybase datase.
The xsd I use as input is quite big and generate a quite big hibernate mapping. So when trying to retrieve the object from the database, the query generated by hibernate is too big for my dataserver (it contains more than 50 tables that is apparently the maximum number supported by sybase)
Is there a way to split the generated hibernate query in sub-queries by using temporary tables in order to decrease the number of tables by query ?
Thank you by advance
|