-->
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: Two classes created from single DB row? Is it possible?
PostPosted: Mon Feb 26, 2007 10:08 am 
Newbie

Joined: Mon Jan 29, 2007 5:14 pm
Posts: 8
Location: Czech Republic, Europe
Hello all!

Hibernate version: al version, 1.2b3

I would like to map single row to two classes and objects. Why I need that?

For instance, a Customer object may be responsible for adding and editing customer data. A CustomerInfo object in the same application may be responsible for providing read-only access to customer data. Both objects will use the same data from the same database and table, but they provide different behaviors.

Hope this is a problem in H. At least when I make HQL "from Object" what class should be instantiated from that row?
Curretnly when I map two classes to one table, got NHibernate.DuplicateMappingException: Duplicate class/entity mapping GxUser


Thank you in advance for responses!


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.