Re: performing count

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Jun 04 2007 - 11:08:32 EDT

  • Next message: Marcin Skladaniec: "SQLTemplate not faulting an object"

    On Jun 4, 2007, at 5:06 PM, Michael Gentry wrote:

    > Putting it in DataObjectUtils doesn't seem the right place to me.
    > Using your example:
    >
    > DataObjectUtils.objectForQuery(...)
    >
    > returns a DataObject (which makes sense to me, being packaged in
    > DataObjectUtils). Something that returns an int, which can't even be
    > converted into a DataObject, doesn't feel like it should be in
    > DataObjectUtils.

    I agree that DataObjectUtils becoming a kitchen sink is bad, and
    "DataObjectUtils" name is a bit obsolete anyways, considering that
    "Persistent" is the interface Cayenne stack is dealing with. So
    DataObjectUtils class itself needs some redesign (split QueryUtils
    out of it or something?)

    My other point about not adding fetch methods to the query classes is
    still valid though. So we can either push for DataObjectUtils
    redesign now, or use it as a kitchen sink one more time :-)

    Andrus



    This archive was generated by hypermail 2.0.0 : Mon Jun 04 2007 - 11:08:57 EDT