Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » ReadOnly object with NativeQuery
ReadOnly object with NativeQuery [message #653923] Fri, 11 February 2011 21:30 Go to next message
Fericit Bostan is currently offline Fericit BostanFriend
Messages: 68
Registered: June 2010
Member
I'm using EclipseLink 2.1 and have a use case for returning an object that would be a ReadOnly view of the data. The NativeQuery would consist of joining approximately 6 tables or more and would only return select fields from those tables to populate the object. I would prefer to use the Criteria API as the object can be queried by PrimaryKey or sets can be returned based upon other matching criteria.

Is there a good example of this type of mapping or can you point me to the documentation that might outline this?

Thanks....
Re: ReadOnly object with NativeQuery [message #654196 is a reply to message #653923] Mon, 14 February 2011 14:52 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

There is some info on querying in JPA here,

http://en.wikibooks.org/wiki/Java_Persistence/Querying


James : Wiki : Book : Blog : Twitter
Previous Topic:FetchGroup and column alias
Next Topic:JPA 2 : how can I do ReportQueryResult
Goto Forum:
  


Current Time: Tue Dec 23 00:15:07 GMT 2014

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

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