-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Too many left outer join (and table) on select generated
PostPosted: Fri Nov 17, 2006 9:32 am 
Newbie

Joined: Fri Nov 17, 2006 9:16 am
Posts: 6
First, I want to excuse to me for my english.

I have a problem with the select generate by hibernate, because it exceds max number of tables accepted by sysbase (>50).

I have a great relations number between my tables in mapping files and I haven't to use lazy loading (lazy=true) in many-to one.

The problem is that Hibernate generate a big select with more than 50 tables name (left outer join table1 .... left outer join tablen). Then when I execute a test to recover a object, I recieve the following error:

<WARN > <org.hibernate.util.JDBCExceptionReporter> SQL Error: 106, SQLState: ZZZZZ
<ERROR> <org.hibernate.util.JDBCExceptionReporter> Too many table names in the query. The maximum allowable is 50.

How can I restrict the level of level o left outer joins generated automatically by hibernate.
I want to recover the first o second level on the hierarchy.

I am use hibernate 3.2 with Sybase

Thanks for your help and attention


Top
 Profile  
 
 Post subject: try limiting fetch depth
PostPosted: Fri Nov 17, 2006 9:52 am 
Newbie

Joined: Tue Oct 07, 2003 4:17 pm
Posts: 9
You can limit the number of join levels in the generated query with hibernate.max_fetch_depth=n.... have you tried that? I think the mappings also allow a per class fetch depth setting....

hth,
Carl

_________________
Carl
NCR/Teradata Boston


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 12:16 pm 
Newbie

Joined: Fri Nov 17, 2006 9:16 am
Posts: 6
Thanks, now It's work correctly


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.