Re: partial selects using SqlSelectQuery

From: Craig Miskell (cmiskel..lbatross.co.nz)
Date: Sat Apr 12 2003 - 04:05:30 EDT

  • Next message: Andrus Adamchik: "Re: column name twice error"

    Yep, that's exactly what's supposed to happen. The idea is that if you're
    going to manually execute some sql, then Cayenne shouldn't really
    intervene. In this case, it's just kind of being nice and hiding some of
    the gorier JDBC details. In fact, the object type ("MyTableObj") is
    irrelevant with respect to the sql you pass in, it is only used in order
    to identify a DataNode in order to choose which db to use. In most cases
    this is redundant, but it's possible to have multiple DataNodes connecting
    to different DB's, in which case this may be important.

    Craig

     On Fri, 11 Apr 2003, Troy McKinnon wrote:

    > I am trying to do a partial select. I used the following code:
    >
    > SqlSelectQuery query = new SqlSelectQuery("MyTableObj", sql);
    > return ctxt.performQuery(query);
    >
    > I assumed that since I am passing the object type in, that it would return a
    > list of these objects. But after debugging, I noticed that it actually
    > returns an ArrayList of HashMaps...
    >
    > am I doing something wrong, or is this how this is suppose to work?
    >
    > Troy
    >
    >



    This archive was generated by hypermail 2.0.0 : Sat Apr 12 2003 - 04:08:55 EDT