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 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 skips those Products who have no
Price whereas with_objects returns all Products even with empty Price.
(Products and Price as in the example from pod where 1 Product has N
Prices.)
I'm fine with that. I especially like the "shortcut" 'distinct => 1'.
But distinct => [...] has a double meaning: distinct and "fetch only
this tables/objects". But I think this is only a minor problem.
Hm, well how about a fetch_only param that means the same thing as the
proposed distinct param, but omits the keyword DISTINCT?
I'm not quite sure:
1. Is there a reason where we would need DISTINCT? (Performance when
lots of duplicates)
2. Does it hurt? Why not use it always? (I think it might be slower on
"unique" result sets.)
So the question remains: Do we need both parameters?
You could split it: "fetch_only" is an arrayref of tables, "distinct" is
only a boolean.
Given the example with Price.region = 'DE': When I want to get a list of
all regions I have to do "SELECT DISTINCT region FROM Price" - is there
a way to do this in RDBO? It's not an object what is returned.
Bye, Uwe
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object