Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » How to ise dynamic fetchgroup
How to ise dynamic fetchgroup [message #982948] Tue, 13 November 2012 15:03 Go to next message
Gérard Grodeg is currently offline Gérard Grodeg
Messages: 2
Registered: November 2012
Junior Member
Hello,

I read documentation about fetch group but I dont really understand how does it work

I mean

I have DAO object describing tables

I want to get back a part of fiels of one of the table using dynamic fetchgroup

What are the steps to get back fields and to read them afterwards

Thank you for a short code description a little bit more clear than what I can read on official documentation

for exemple I can read the folwoing things

ReadAllQuery query = new ReadAllQuery(Employee.class);
FetchGroup group = new FetchGroup("nameAndSalary");
group.addAttribute("firstName");
group.addAttribute("lastName");
group.addAttribute("salary");
query. setFetchGroup(group);

which doesnt give any results to get back any information

if I have a table toto whith a toto.class DAO object and Field1 to Field5.
If i want to get back only Field2 and field4 what should I do ?

Thank you
Re: How to ise dynamic fetchgroup [message #982998 is a reply to message #982948] Tue, 13 November 2012 15:42 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

See,

http://wiki.eclipse.org/EclipseLink/Examples/JPA/AttributeGroup


James : Wiki : Book : Blog : Twitter
Previous Topic:problem to get stored procedure that does not return anything.
Next Topic:Pagination - FIRST_ROWS_N
Goto Forum:
  


Current Time: Tue Oct 21 05:45:13 GMT 2014

Powered by FUDForum. Page generated in 0.02732 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software