Another thing I'd like to officially tag as "legacy" - SelectQuery
"customDbAttributes" option that would allow to fetch a subset of
columns as a DataRow. It's always been a hack and now there is a more
or less direct replacement - EJBQL that allows to select individual
*object* attributes. In fact it is more powerful, as it allows to
traverse relationships:

String ejbql = "select p.estimatedPrice, p.toArtist.artistName from
Painting p order by p.estimatedPrice";
EJBQLQuery query = new EJBQLQuery(ejbql);
List<Object[]> data = context.performQuery(query);

Also note that the returned result consists of Object[]'s, not
DataRows. This can be much easier to parse in the calling code in many
situations (with this morning trunk commits, potentially any type of
query can generate an Object[] result... I'd like to start using that
myself to get a feel of how much more usable this is compared to
DataRows. Certainly less wasteful CPU and memory-wise).

Anyways, unless I hear strong objections, I am going to deprecate
SelectQuery custom attributes.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
postedDec 1, '08 at 7:08p
activeDec 1, '08 at 7:08p

1 user in discussion

Andrus Adamchik: 1 post



site design / logo © 2021 Grokbase