-->
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.  [ 1 post ] 
Author Message
 Post subject: Trouble Mapping a Recursive Hierarchy
PostPosted: Mon Dec 07, 2009 12:58 pm 
Newbie

Joined: Mon Feb 23, 2009 11:16 am
Posts: 17
Hi,

I've been trying to map out an object hierarchy so that I can load it with a set amount of selects (I've been having N+1 issues when simply trying to select all objects at once). I'm starting to think this sort of mapping is not possible to express efficiently in Hibernate and was hoping someone could give their opinions on whether or not this looks possible.

My mapping looks like so:

Abstract Class A;

Class B;
@ManyToOne A;

Class subA1;
@ManyToMany List<B> bList;


I can't find a proper way to map these 3 classes such that I could select all of Class A (subA1 really) without Hibernate doing a select for each List<B> in each A. Ideas?


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

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.