Re: performance issue for id as association

2010-02-21 Thread Jakub Vondrak
Guy Rouillier wrote: > On 2/20/2010 3:21 PM, Jakub Vondrak wrote: >> Hello, >> >> I'm new to iBatis 3 so maybe I'm overooking something obvious, but I'm >> having problem while trying to map id object as association. >> >> Here is my result map >> >> >> >> >> >>

Re: performance issue for id as association

2010-02-21 Thread Jakub Vondrak
Jakub Vondrak wrote: > Guy Rouillier wrote: >> On 2/20/2010 3:21 PM, Jakub Vondrak wrote: >>> Hello, >>> >>> I'm new to iBatis 3 so maybe I'm overooking something obvious, but I'm >>> having problem while trying to map id object as association. >>> >>> Here is my result map >>> >>> >>>

why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Rick R
I'm now starting to get into using ibatis3 more and I'm curious about why a 'roll up' is happening (based on a column I didn't mention as a rollup column) when I use an association. I'm sure it's something stupid I'm missing but I don't see it. For example this flat structure works just fine, and

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Clinton Begin
It rolls up by elements, or if none exist, it rolls up by all columns (which is why specifying an id is important). Clinton On Sun, Feb 21, 2010 at 5:55 PM, Rick R wrote: > I'm now starting to get into using ibatis3 more and I'm curious about why a > 'roll up' is happening (based on a column I

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Rick R
On Sun, Feb 21, 2010 at 8:01 PM, Clinton Begin wrote: > It rolls up by elements, or if none exist, it rolls up by all columns > (which is why specifying an id is important). > I did provide an id which adds to my confusion. The select is: SELECT aga.parentValueID,

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Guy Rouillier
I see what is happening (from the results - I have not read the code and I'm not one of the product's authors.) It appears to be generating an object only on change of value for parentValueID, though you haven't identified that column as an ID column. There are two objects with value 15282 be

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Clinton Begin
Oh... also put an element on the parent (likee parentValueID?). Also, be careful with automapping and nested results. In Beta 9 I added configuration to disable automapping for nested results, only because it was confusing where the results would end up. But that doesn't look like a problem her

Re: Ibator for ibatis 3

2010-02-21 Thread Guy Rouillier
Jeff, I did a fresh checkout and build, and I'm now able to use the Ibator Eclipse feature. Much thanks for making the needed changes. I had to make some small changes to get everything to work: MANIFEST.MF for ui plug-in: Update the following two lines: org.apache.ibatis.ibator.eclipse.cor

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Rick R
On Sun, Feb 21, 2010 at 10:50 PM, Clinton Begin wrote: > Oh... also put an element on the parent (likee parentValueID?). > > Ok that's even more weird now. When I changed: to I now end up with 6 of the rows mapped to objects (instead of 7 without it .. and remember there should be 13 objects

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Guy Rouillier
On 2/21/2010 11:19 PM, Rick R wrote: To Guy's point, not sure if the object's I'm mapping to matter? but if so: Objects look fine. How are you storing the collection of objects? As a List? Because if you are storing a Hashmap, that may explain some missing objects. -- Guy Rouillier ---

Re: Ibator for ibatis 3

2010-02-21 Thread Jeff Butler
Hi Guy, The Eclipse plugin build is undergoing lots of changes right now. Thanks for the reminder about the MANIFEST.MF versions - I definitely need to change those. The section is there because I'm changing the build to use a headless PDE build rather than using the site generate feature. This

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Rick R
On Sun, Feb 21, 2010 at 11:26 PM, Guy Rouillier wrote: > On 2/21/2010 11:19 PM, Rick R wrote: > > To Guy's point, not sure if the object's I'm mapping to matter? but if so: >> > > Objects look fine. How are you storing the collection of objects? As a > List? Because if you are storing a Hashma

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Guy Rouillier
On 2/21/2010 11:19 PM, Rick R wrote: To Guy's point, not sure if the object's I'm mapping to matter? but if so: public class ProdAttrGroupAttrValue extends BaseModel { public class AttributeValue extends BaseModel { After sending my last reply, I noticed both your object classes extend BaseM

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Rick R
BaseModel just has some utility things mostly for XStream (I do also have XStream annotations on my model classes, but I wouldn't think that should mess up ibatis?) BaseModel: @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToString

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Rick R
And those static methods will be moved to a Helper file:) it's not my code:) On Sun, Feb 21, 2010 at 11:43 PM, Rick R wrote: > BaseModel just has some utility things mostly for XStream (I do also have > XStream annotations on my model classes, but I wouldn't think that should > mess up ibatis?)

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Clinton Begin
The reason is that the rows aren't uniquely identified. Upon a second look, I see that the column I recommended isn't unique. Which columns uniquely identify each parent row? On Sun, Feb 21, 2010 at 9:50 PM, Rick R wrote: > And those static methods will be moved to a Helper file:) it's not my

Re: why is ibatis rolling up for an association, not sure why this isn't flat, or what its rolling up on?

2010-02-21 Thread Rick R
On Mon, Feb 22, 2010 at 12:03 AM, Clinton Begin wrote: > The reason is that the rows aren't uniquely identified. Upon a second > look, I see that the column I recommended isn't unique. Which columns > uniquely identify each parent row? > > They'd be unique by a combination of "parentAttributeID

Re: performance issue for id as association

2010-02-21 Thread Guy Rouillier
On 2/21/2010 6:15 AM, Jakub Vondrak wrote: ... What I guess is the problem is that I cannot express *composite key as an BillItemId object* on the BillItem class

Re: performance issue for id as association

2010-02-21 Thread Jakub Vondrak
Guy Rouillier wrote: > On 2/21/2010 6:15 AM, Jakub Vondrak wrote: > ... > >> What I guess is the prob