Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread John Siracusa
On 10/6/05, Uwe Voelker <[EMAIL PROTECTED]> wrote: > Just for me to make it clear: If I run the same query first with > require_objects and then with with_objects the number of (primary) > objects returned by require_objects is always smaller or equal to > with_objects? Because require_objects skip

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread Uwe Voelker
Yeah, but those are all implementation details, really. The distinction as far as the API is concerned is that, if you use require_objects, every object returned will have those sub-objects. If you use with_objects, some might and some might not. Just for me to make it clear: If I run the same

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread John Siracusa
On 10/6/05, Uwe Voelker <[EMAIL PROTECTED]> wrote: >> I don't recall why I had that constraint in there, but I'm pretty sure >> there was a good reason. I'll look into it. > > I just read your mail that you removed this constraint. But I'm curious: > Did you find what the reason was? I'm intereste

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread Uwe Voelker
Hello John, I don't recall why I had that constraint in there, but I'm pretty sure there was a good reason. I'll look into it. I just read your mail that you removed this constraint. But I'm curious: Did you find what the reason was? I'm interested in it. All that leaves is the "distinct"

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread John Siracusa
On 10/6/05, John Siracusa <[EMAIL PROTECTED]> wrote: > On 10/6/05, Uwe Voelker <[EMAIL PROTECTED]> wrote: >> Currently RDBO allows only one table/relation via require_objects. > > I don't recall why I had that constraint in there, but I'm pretty sure > there was a good reason. I'll look into it.

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread John Siracusa
On 10/6/05, Uwe Voelker <[EMAIL PROTECTED]> wrote: > Currently RDBO allows only one table/relation via require_objects. I don't recall why I had that constraint in there, but I'm pretty sure there was a good reason. I'll look into it. > In my application I would need one 1:N and a prefetch (via

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread Uwe Voelker
SELECT DISTINCT products.* FROM products LEFT JOIN prices ON (products.id = prices.product_id) WHERE prices.region = 'DE' LIMIT 1, 1 I guess I'm wondering why require_objects isn't sufficient. IOW, is the DISTINCT part important or is it the fact that only columns from products are actually

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread John Siracusa
On 10/6/05 4:13 AM, Uwe Voelker wrote: >> But is there a way to do the following in RDBO: >> >> SELECT DISTINCT products.* >> FROM products LEFT JOIN prices ON (products.id = prices.product_id) >> WHERE prices.region = 'DE' >> LIMIT 1, 1 >> >> RDBO has no problems with the FROM and WHERE line, bu

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-06 Thread Uwe Voelker
Hello John, thanks for the new release. Two annoying bugs in my application are gone. The following important question is still open: But is there a way to do the following in RDBO: SELECT DISTINCT products.* FROM products LEFT JOIN prices ON (products.id = prices.product_id) WHERE prices.reg

Re: [RDBO] limit and offset with one-to-many relationship

2005-10-04 Thread John Siracusa
On 10/4/05, Uwe Voelker <[EMAIL PROTECTED]> wrote: > using limit and offset does not work with an one-to-many relationship. > [...] > Also the following warning occurs: I fixed the errors and the warnings and checked in the changes. I think I fixed it for iterators too, but let me know if you see

[RDBO] limit and offset with one-to-many relationship

2005-10-04 Thread Uwe Voelker
Hello John, using limit and offset does not work with an one-to-many relationship. The attached script (which requires the rest of the files from my earlier postet example.tgz) returns always the same tupel. Also the following warning occurs: WARNING: Fetching sub-objects via more than one "