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 Joose Vettenranta <jo...@iki.fi> on 2005/12/19 15:31:36 UTC
feature or a bug?
Hi,
I'm using interface to get lot's of data from different tables.. But
I have a problem.
query.addOrderBy(field);
it orders by result, but per table, not whole result. When looking at
postgresql query log, I see that it is implemented like this:
SELECT ... FROM bar1 orderBy fieldID;
SELECT ... FROM bar2 orderBy fieldID;
SELECT ... FROM bar3 orderBy fieldID;
so, of course it won't sort it right..
wouldn't it work better, if it would generate it like this:
SELECT .. FROM bar1 UNION SELECT .. FROM bar2 UNION SELECT .. FROM
bar2 order by fieldID;
or have I configured it wrong?
- Joose
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: feature or a bug?
Posted by Joose Vettenranta <jo...@iki.fi>.
I have in repository like this:
<class-descriptor class="net.vettenranta.interfaceForEverything"
proxy="dynamic">
<extent-class class-ref="net.vettenranta.Everything1" />
<extent-class class-ref="net.vettenranta.Everything2" />
<extent-class class-ref="net.vettenranta.Everything3" />
<extent-class class-ref="net.vettenranta.Everything4" />
</class-descriptor>
and then net.vettenranta.Everything1 doesn't have anything special
defined for that Interface. what I read from documentation, it should
use outer left join for those fields automaticly if extent is used.
but it doesn't.
I don't know does it matter, but I'm not retrieving collection, I'm
retrieving Iterator.
- Joose
Joose Vettenranta kirjoitti 19.12.2005 kello 16:31:
> Hi,
>
> I'm using interface to get lot's of data from different tables..
> But I have a problem.
>
> query.addOrderBy(field);
>
> it orders by result, but per table, not whole result. When looking
> at postgresql query log, I see that it is implemented like this:
>
> SELECT ... FROM bar1 orderBy fieldID;
> SELECT ... FROM bar2 orderBy fieldID;
> SELECT ... FROM bar3 orderBy fieldID;
>
> so, of course it won't sort it right..
>
> wouldn't it work better, if it would generate it like this:
> SELECT .. FROM bar1 UNION SELECT .. FROM bar2 UNION SELECT .. FROM
> bar2 order by fieldID;
>
> or have I configured it wrong?
>
> - Joose
>
> --
> "Always remember that you are unique, just like everyone else!"
> * http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org