cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ab@dataloy.com"...@dataloy.com>
Subject ObjectSelect.columnQuery
Date Wed, 04 Oct 2017 09:45:21 GMT
Should ObjectSelect.columnQuery  execute a SQL query with just one column selected?

I am using Cayenne 4.1 but running this code:

Property<Cargo> property1 = Property.create("area", Cargo.class);

List<Cargo> select = ObjectSelect.columnQuery(Cargo.class,property1).where(Expression.fromString("area>10")).select(ctx);

the query executed select all the columns of cargo table.

I need to specify which columns the queries must return because I have tables with hundreds
of columns that I do not need, returning all the columns every time is very time consuming.


Andrea

Mime
View raw message