[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] select part of an entity
|
Hi Derek,
Try simply specifying the LAZY fetch type on the annotation for your mapping
or in the orm.xml.
e.g.
@Basic(fetch=FetchType.LAZY)
-Tom
Derek Knapp wrote:
I have a table, which I run a very simple select on, for example,
select e from Email e where e.createDate between :start and :end
but the problem is that the Email has a column "body" which contains a
lot of data, and I really don't need that information right now.... is
there a way to make it not select that column?
the only solution I can think of is to create a new class with the
fields I want from the Email entity, then do something like
select new itrac.data.EmailReport(e.id, e.name, e.subject, ...) from
Email e where e.createDate between :start and :end
but is there a better way??
Derek
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users