cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikita Timofeev <ntimof...@objectstyle.com>
Subject Re: ColumnSelect API + Persistent objects
Date Mon, 13 Mar 2017 08:54:07 GMT
>
> What is the output of this:
>
> result = ObjectSelect.query(Artist.class)
>        .columns(createSelf(Artist.class))
>        .select(context);
>
> Is that the same as
>
> result = ObjectSelect.query(Artist.class)
>        .select(context);
>
> would the generated SQL be the same?
>

Small comment on this.

With columns() method the result will be List<Object[]> (where
Object[0] is an Artist object).
And with column() method both results will be identical (List<Artist>).

Generated SQL should be the same too, though direct query apparently
is more efficient,
as it will use some shortcuts based on assumption that it will get
only one type of objects.

-- 
Best regards,
Nikita Timofeev

Mime
View raw message