Joined: Fri Jul 08, 2011 8:45 am Posts: 6
|
Hi
I'm building an application with Hibernate 3.5.6 and Spring. The application defines objects that are mapped onto a number of database tables and are managed successfully by an EntityManager.
Now I want to create a 'derived' object which contains fields that are drawn from several different existing tables. The POJO is simple to define. The SQL query that delivers a result set for these fields is also pretty straightforward. The object could be thought of as an entity because one of its fields can serve as a unique ID. The object is always read-only - it essentially provides summary information on other business objects.
Can I implement this object using a Hibernate EntityManager and Hibernate annotations?
Thanks for your advice.
Bruno.
UPDATE: Marking this POJO as an @Entity would solve the problem to a significant extent, except that a spurious table is created! Is there any way of annotating an entity to prevent table creation for that specific entity?
|
|