Re: Avoiding N+1 Selects

2007-03-02 Thread Larry Meadors
No. Larry On 2/28/07, Brad Handy [EMAIL PROTECTED] wrote: I think I could use a row handler to arrange the objects in a situation like this. One question I have: Do the results of a query with a custom RowHandler still get cached when using OSCache? Brad On 2/22/07, Brad Handy [EMAIL

Re: Avoiding N+1 Selects

2007-02-22 Thread Brad Handy
iBatis came back with an error message indicating too many objects were being returned for executeQueryForObject. Brad On 2/20/07, Brad Handy [EMAIL PROTECTED] wrote: Wouldn't I have to give unique column names for those identifying the child data? For example table parentChild

RE: Avoiding N+1 Selects

2007-02-20 Thread Abdullah Kauchali
@ibatis.apache.org Subject: Avoiding N+1 Selects I have a table which has all of the parent/child relationships in the same table. I would like to avoid the N+1 selects with this construct, but it's unclear from the documentation if this can be done. Let's say

Re: Avoiding N+1 Selects

2007-02-20 Thread Brad Handy
I guess I should've mentioned I'm using Sybase. :o) On 2/20/07, Clinton Begin [EMAIL PROTECTED] wrote: i.e. is it a join with a bridge table or not (1:M or M:N)? Regardless, I wonder if a recursive result map would workIt might. resultMap id=Node ... result name=children ...

Re: Avoiding N+1 Selects

2007-02-20 Thread Brad Handy
Wouldn't I have to give unique column names for those identifying the child data? For example table parentChild some_foreign_key int id int description varchar(64) parent_id int rows id descriptionparent_id 0 grandparent

Avoiding N+1 Selects

2007-02-19 Thread Brad Handy
I have a table which has all of the parent/child relationships in the same table. I would like to avoid the N+1 selects with this construct, but it's unclear from the documentation if this can be done. Let's say I have the following relationships defined in the table: Grand Parent Parent 1

Re: Avoiding N+1 Selects

2007-02-19 Thread Clinton Begin
You'll need one query with 3 result maps. The result maps will be chained together with collection properties using the resultMap attribute. resultMap id=Child ... resultMap id=Parent result ... resultMap=Child/ ... resultMap id=GrandParent result ... resultMap=Parent/ ... select ...

Re: Avoiding N+1 Selects

2007-02-19 Thread Brad Handy
I guess I'll have to take a different approach. The depth isn't set to be a defined level; so if I go more than two levels below the grandparent, it won't work. On 2/19/07, Clinton Begin [EMAIL PROTECTED] wrote: You'll need one query with 3 result maps. The result maps will be chained

Re: Avoiding N+1 Selects

2007-02-19 Thread Clinton Begin
Oh...is it a self join? Clinton On 2/19/07, Brad Handy [EMAIL PROTECTED] wrote: I guess I'll have to take a different approach. The depth isn't set to be a defined level; so if I go more than two levels below the grandparent, it won't work. On 2/19/07, Clinton Begin [EMAIL PROTECTED] wrote:

RE: Avoiding N+1 Selects

2007-02-19 Thread Chris Lamey
that kind of thing, you could use it and a row handler to pull the results into what you need. -Original Message- From: Brad Handy [mailto:[EMAIL PROTECTED] Sent: Mon 2/19/2007 8:17 PM To: user-java@ibatis.apache.org Subject: Re: Avoiding N+1 Selects I guess I'll have to take a different

Re: Avoiding N+1 Selects

2007-02-19 Thread Larry Meadors
Hey Bradley! So what's the database? Larry On 2/19/07, Brad Handy [EMAIL PROTECTED] wrote: I guess I'll have to take a different approach. The depth isn't set to be a defined level; so if I go more than two levels below the grandparent, it won't work. On 2/19/07, Clinton Begin [EMAIL

Re: Avoiding N+1 Selects(1:M and M:N) with iBATIS version 2.1.7

2006-11-09 Thread proge . allievi
Avoiding N+1 Selects(1:M and M:N) with iBATIS version 2.1.7

Re: Avoiding N+1 Selects(1:M and M:N) with iBATIS version 2.1.7

2006-11-09 Thread Minjae Kim
cc Please respond to [EMAIL PROTECTED] Subject apache.org Avoiding N+1 Selects(1:M and M:N

Avoiding N+1 Selects(1:M and M:N) with iBATIS version 2.1.7

2006-11-08 Thread Minjae Kim
I read the explanation about Avoiding N+1 Selects(1:M and M:N) with 2.2.0, but the version I am using now is 2.1.7. Is there way I can do this job like 2.2.0 by using 2.1.7? Make sense? English is not my native language, so please understand me. ^___^ sqlMap namespace=ProductCategory