Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » metamodel with two data sources using annotations(Metamodel with annotations getting data from multiple sources.)
metamodel with two data sources using annotations [message #1022914] Fri, 22 March 2013 19:31 Go to next message
Michele Cozart is currently offline Michele CozartFriend
Messages: 1
Registered: March 2013
Junior Member
I'm using Eclipselink 2.4 and I'm trying to create a metamodel class using annotations that references data being returned from a view and also from various stored procedures. I've looked at some promising ones (MappedSuperclass, multitenant ...) but I'm not sure of the best way to proceed.

The view and queries are both read-only and their data structure is the same. I don't want to have to duplicate code by creating a model for each. Any suggestions would be appreciated. Thanks.
Re: metamodel with two data sources using annotations [message #1027059 is a reply to message #1022914] Tue, 26 March 2013 14:09 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You should be able to map an Entity to the view. For the stored procedures you should be able to use a @NamedStoredProcedureQuery that maps to the same entity class.

James : Wiki : Book : Blog : Twitter
Previous Topic:Custom Insert/Update/Delete (Virsioning)
Next Topic:Scrollable ResultSet Exception "End of Stream"
Goto Forum:

Current Time: Sat Feb 24 18:45:53 GMT 2018

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

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