You can define in-memory, read-only "views" of data in cases where you are working with a schema that does not allow change (in this case, creation of a new view). Such a view entity would (obviously) depend on one or more other "normal" entities, viz. the entities that are involved in making up this view.
Use the <synchronize> tag to tell Hibernate which tables (entities)to synchronize this read-only entity with. This ensures that this derived entity does not return stale data when changes to the entities that it depends on are flushed.
HTH
Satish
|