You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by St...@fws.gov on 2005/07/10 00:21:33 UTC

setPathOuterJoin() in 1.0.4

Is setPathOuterJoin() supposed to get a path or a single path component? 
i.e., if I have an attribute path "activity.staff.firstName" and I want to 
force an outer join to the "staff" table, should I call 
setPathOuterJoin("staff") or setPathOuterJoin("activity.staff")?  The name 
of the method suggests the latter (which I'd think would also be more 
useful), but the code expects the former: In SqlQueryStatement.java:1069 
(in 1.75.2.8, which is the latest on the 1.0 branch), it's checking 
against ObjectReferenceDescriptor.getAttributeName(), which is just 
"staff".

It would seem much more useful to use the full path (in SqlQueryStatement, 
this would mean testing attrPath rather than attr) - what if I have two 
different paths to reach the "staff" object and I want inner joins along 
one path and outer along the other?

Probably either the method name should be changed to 
setAttributeOuterJoin() or the implementation should be changed to accept 
a path.

-steve

Steve Clark
ECOS Development Group
steve_clark@fws.gov
(970)226-9291


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: setPathOuterJoin() in 1.0.4

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi steve,

i know it's a long time since we first talked about this issue...
the weather is getting colder now and i have time to fix this.

i agree it would be better to use the path instead of the attribute.
we'll have to define the behaviour of setPathOuterJoin("a.b").
does it force an outer join on each path segment or only the last one ? 
imo the outer join should only be forced on the last segment. to have it 
on both segments would require two calls setPathOuterJoin("a.b") and 
setPathOuterJoin("a").

what do you think ?

jakob


Jakob Braeuchi schrieb:
> hi steve,
> 
> thanks for your feedback, i'll have a look at it asap.
> 
> jakob
> 
> Steve_Clark@fws.gov schrieb:
> 
>> Is setPathOuterJoin() supposed to get a path or a single path 
>> component? i.e., if I have an attribute path 
>> "activity.staff.firstName" and I want to force an outer join to the 
>> "staff" table, should I call setPathOuterJoin("staff") or 
>> setPathOuterJoin("activity.staff")?  The name of the method suggests 
>> the latter (which I'd think would also be more useful), but the code 
>> expects the former: In SqlQueryStatement.java:1069 (in 1.75.2.8, which 
>> is the latest on the 1.0 branch), it's checking against 
>> ObjectReferenceDescriptor.getAttributeName(), which is just "staff".
>>
>> It would seem much more useful to use the full path (in 
>> SqlQueryStatement, this would mean testing attrPath rather than attr) 
>> - what if I have two different paths to reach the "staff" object and I 
>> want inner joins along one path and outer along the other?
>>
>> Probably either the method name should be changed to 
>> setAttributeOuterJoin() or the implementation should be changed to 
>> accept a path.
>>
>> -steve
>>
>> Steve Clark
>> ECOS Development Group
>> steve_clark@fws.gov
>> (970)226-9291
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: setPathOuterJoin() in 1.0.4

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi steve,

thanks for your feedback, i'll have a look at it asap.

jakob

Steve_Clark@fws.gov schrieb:
> Is setPathOuterJoin() supposed to get a path or a single path component? 
> i.e., if I have an attribute path "activity.staff.firstName" and I want to 
> force an outer join to the "staff" table, should I call 
> setPathOuterJoin("staff") or setPathOuterJoin("activity.staff")?  The name 
> of the method suggests the latter (which I'd think would also be more 
> useful), but the code expects the former: In SqlQueryStatement.java:1069 
> (in 1.75.2.8, which is the latest on the 1.0 branch), it's checking 
> against ObjectReferenceDescriptor.getAttributeName(), which is just 
> "staff".
> 
> It would seem much more useful to use the full path (in SqlQueryStatement, 
> this would mean testing attrPath rather than attr) - what if I have two 
> different paths to reach the "staff" object and I want inner joins along 
> one path and outer along the other?
> 
> Probably either the method name should be changed to 
> setAttributeOuterJoin() or the implementation should be changed to accept 
> a path.
> 
> -steve
> 
> Steve Clark
> ECOS Development Group
> steve_clark@fws.gov
> (970)226-9291
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org