-->
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.  [ 4 posts ] 
Author Message
 Post subject: polymorphic queries for 100+ entity types
PostPosted: Wed Jan 31, 2007 5:38 am 
Newbie

Joined: Wed Jan 31, 2007 4:55 am
Posts: 2
Hi All,

I searched in the existing topics for the answer, but not found any usable solution, that's why I opened this one.

The context of the problem:
I develop a system (JBoss AS 4.0.5, Java 1.5, EJB3, PostgreSQL 8.2) which (once it will be ready) makes possible to the end user to define entities and their relationships (e.g. one entity can be the property of an other), and this relationship can be 1-1, 1-n, polymorphic, etc. The defined entity-hierarchies are then stored in RDBMS.

The problem arises, when there are "much" entities and "much" relationships among the entities. (much==over 30 entity types).
When try to get the entity instance out of the DB, Hibernate generate one ~180KB length of SQL query, which is not parseable by the DB. (e.g. there are more than 5000 column names in the query since Hibernate uses JOIN for all the affected tables, whereas PostgreSQL has a 1664 field count limit for SELECTs).
I use InheritanceType.JOINED inheritance strategy ( I'm afraid of InheritanceType.TABLE_PER_CLASS would result the same).
The aim would be to instruct Hibernate somehow to not to fetch the entities with one "monolithic" query, but slice it up to more manageable parts. Or, if it is not possible, then how can this be controlled manually?

Any help would be appreciated.

Thank you,
Istvan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 6:03 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
it s possible using hbm files (<join fetch="select"/>) but no yest in annotations.

Contribution welcome :-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 07, 2007 4:47 am 
Newbie

Joined: Wed Jan 31, 2007 4:55 am
Posts: 2
Thank you, it might help.

Istvan


Top
 Profile  
 
 Post subject: Re: polymorphic queries for 100+ entity types
PostPosted: Sun Apr 19, 2015 5:10 pm 
Newbie

Joined: Sun Apr 19, 2015 4:37 pm
Posts: 1
Did you solved your problem?

I have tried annotating Parent class with PolymorphismType.EXPLICIT, but no luck.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.