Skip to main content

[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.




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,, e.subject, ...) from Email e where e.createDate between :start and :end

but is there a better way??

eclipselink-users mailing list

Back to the top