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 Jakob Braeuchi <jb...@gmx.ch> on 2004/10/01 22:54:03 UTC
Re: Reqport Queries and "Multiple Attributes"
hi chris,
i did some investigations on this topic. and things are getting quite
complicated. consider the following simple query:
SELECT ... from a where upper((attr1 || b.attr2 = "TEST")
would translate into (no extents available)
SELECT ... from a A0 inner join A1 on ... where upper((A0.col1 || A1.col2 = "TEST")
when we have extents it's getting worse:
SELECT ... from a A0 inner join A1 on ... inner join A1E1 on ... where
upper((A0.col1 || A1.col2 = "TEST") or upper((A0.col1 || A1E1.col2 = "TEST")
i do not want to show the sql when both classes have extents...
we will end up with a combination of all the extents.
jakob
chris schrieb:
>>when processing the criteria ojb tries to extract the attribute name from ie:
>>upper (col1) and translates it into the correct column name ie. my_column_1.
>>this works usually fine, except when a criteria contains more than one
>>attribute. this is a situation ojb cannot handle today, it assumes one criteria
>>- one attribute (see SqlQueryStatement). i admit this is not the most flexible
>>way but ojb is meant to be an or-mapper, the report-query stuff was added later.
>
>
> OK, that makes sense. That's what I figured should be going on, but I
> thought the statement from the Scarab entry was saying something
> different. Thanks for you reply.
>
> ---------------------------------------------------------------------
> 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: Reqport Queries and "Multiple Attributes"
Posted by chris <on...@gmail.com>.
Yeah, I do see the ugliness now. I wasn't very familiar with
'extents'.... so I read up on it, and I see what you're talking about.
That doesn't look like fun at all! Thanks for the heads up.
On Fri, 01 Oct 2004 22:54:03 +0200, Jakob Braeuchi <jb...@gmx.ch> wrote:
> hi chris,
>
> i did some investigations on this topic. and things are getting quite
> complicated. consider the following simple query:
>
> SELECT ... from a where upper((attr1 || b.attr2 = "TEST")
>
> would translate into (no extents available)
>
> SELECT ... from a A0 inner join A1 on ... where upper((A0.col1 || A1.col2 = "TEST")
>
> when we have extents it's getting worse:
>
> SELECT ... from a A0 inner join A1 on ... inner join A1E1 on ... where
> upper((A0.col1 || A1.col2 = "TEST") or upper((A0.col1 || A1E1.col2 = "TEST")
>
> i do not want to show the sql when both classes have extents...
> we will end up with a combination of all the extents.
>
> jakob
>
> chris schrieb:
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org