Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » How to ise dynamic fetchgroup
How to ise dynamic fetchgroup [message #982948] Tue, 13 November 2012 10:03 Go to next message
Eclipse UserFriend
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 10:42 Go to previous message
Eclipse UserFriend
See,

http://wiki.eclipse.org/EclipseLink/Examples/JPA/AttributeGroup
Previous Topic:problem to get stored procedure that does not return anything.
Next Topic:Pagination - FIRST_ROWS_N
Goto Forum:
  


Current Time: Wed Jul 23 10:00:00 EDT 2025

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

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

Back to the top