db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Re: feature request
Date Tue, 19 Apr 2005 07:02:33 GMT




Thomas Vandahl <thomas.vandahl@tewisoft.de> schrieb am 19.04.2005 08:27:34:
> Thomas Fischer wrote:
> > I have no idea how to create such a query on the fly. Maybe something
in
> > the archives of the user list can be found. The main problem seems to
me to
> > create q query where one column value is compared to another column
value,
> > but I am not sure.
>
> There is "Criteria.add(column, object, Criteria.CUSTOM)" as in
>
> criteria.add(alias + ".IDPERSON", (Object)(alias + ".IDPERSON=" +
>                        PersonPeer.IDPERSON), Criteria.CUSTOM);
>
> It has proven to work in this case.

Good one. I did not know that.

> > Again, in my opinion the code to compose the right query for the join
from
> > a string would be quite difficult. My guess is that a "select * " will
not
> > do and will return the wrong order of columns, leading to disastrous
> > results.
>
> Well, if you are aware of the fact that you need to handle Village
> Records in this case, you can always use BasePeer.executeQuery().
>

This also came into my mind. The point is that one does not want to bother
about village records, but one wants to fill the data objects with the
result of the query, and this is the difficult part, and where the column
order comes in.

I do see Mickeys point, but I do not see an easy way to implement that
feature, athough it would certainly be helpful.

     Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message