In SVN

On 12/19/06, Bruno Silva (Cool Advance) <bruno.silva@cooladvance.com> wrote:
Wouldn't it be better to allow for a QueryForObject<T>()? Suppose the person who creates the query (A) is not the same person who develops the DAO code (B), should it be mandatory that A knows that mapping X is actually a subset of n+1?

In my case, I want Order 1 and everything associated to it, so my first approach was to get an object and not a list. I think it is actually easy to change this behavior to what I pretend, I made a simple change to check if it worked, so I just avoid setting the result to BaseStrategy.SKIP in method RunQueryForObject():

object obj = _resultStrategy.Process(request, ref reader, resultObject);

                        if (obj != BaseStrategy.SKIP)
                            result = obj;

I would like to know if you consider adding those changes to the main source code. However, if  you don't agree with me, will probably end up using the QueryForList again because I wouldn't like to create my own version :)

Regards,
  Bruno Silva

Gilles Bayon wrote:
It's a subset of n+1 and for solve it you must use a QueryForList<T>()[0] as you have done

On 12/19/06, Bruno Silva (Cool Advance) < bruno.silva@cooladvance.com> wrote:
For example, if I have two tables Order and OrderDetails, how do I get all the orders details from order number 1 without using n+1 selects? Isn't this the purpose of the groupBy attribute?

Regards,
  Bruno Silva

Gilles Bayon wrote:
It only makes sense to use groupBy attribute with a QueryForList.


--
Cheers,
Gilles

<a href=" http://www.amazon.com/gp/registry/6JCP7AORB0LE ">Wish List</a>

--
Bruno Silva
Cool Advance - Information Systems



--
Cheers,
Gilles

<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE ">Wish List</a>

--
Bruno Silva
Cool Advance - Information Systems



--
Cheers,
Gilles

<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a>