Hello everyone!
I have a web application in which i m using Hibernate for the persistence of my database. It s a simple project with one POJO, its Hibernate-Mapping and some other interfaces for the users.
But I need to extract different attributes from the POJO and give them to my users in a certain format. So my question is, how to do this the easiest and most secure way? Is it possible to build a second Mapping file for the same POJO but only with the relative attributes, so if the user calls the according method, only the second mapping file comes into play and only the chosen attributes will be displayed, not everyone of them, which are mapped through the first and standard mapping file? It seems logical, but then i wonder, if there might be any problem with the sessions?
Or should I just build a second POJO+second Mapping? But how can I than assure that there won't be any inconsistencies on the only one existing table?
Every help would be appreciated. Thanks!
|