-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: One POJO, one table and two mappings?
PostPosted: Fri Jan 18, 2013 8:21 am 
Newbie

Joined: Fri Jan 18, 2013 8:09 am
Posts: 1
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.