I am working on enhancing an existing application that uses Hibernate as its ORM layer. There are already some DB model classes and corresponding hibernate mapping files defined with lots of relations to other tables/objects. For my changes, I would only need a subset of this data and a few new data fields/relations to some other tables in my object. I just wanted to know, what in your opinion is the best design approach - [*]reuse the existing mapping. This could lead to lot of data being queried from the DB which I would not even need. [*]or, create my own pojo class and corresponding mapping with a limited set of data that I need.
|