Hello Everybody!
We have the following structural design question:
The application we work on is a client-server-application, which connects a rich-client with it’s server via spring-remoting. This is of importance because it explains, why we are interested in optimizing the amount of data transferred over the line.
In our database we have an entity with quite a lot of fields and references. In the application this entity occurs in at least two forms. First there is what I will call the “full”-object, intended for working on the actual entity-instance. The second form is a much more lightweight representation, just containing some of the fields, required in situations, when the entity is presented as a reference.
As all fields of the lightweight-representation are also included in the fullfeatured-representation, it extends the lightweight-representation.
As we have to work on a legacy-database, we strongly try to avoid changes to the schema.
The fact that the two representations are modelled as class hierarchy in the object-world does not need to be represented in the database, because the different classes somehow represent different “views” on the same entity.
Is this possible to configure with Hibernate, or is there a better design-approach for such scenarios?
Any Suggestions are appreciated,
Regards,
Markward Schubert
|