-->
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.  [ 3 posts ] 
Author Message
 Post subject: Same class different tables
PostPosted: Thu Oct 19, 2006 12:16 am 
Newbie

Joined: Thu Oct 19, 2006 12:08 am
Posts: 2
All,

I hope this isnt a particularly stupid question. I have used Hibernate (java) a bit, but Im new to .NET and NHibernate.

We have a requirement to map the same class with different names.

In Hibernate 3 this could be done with somethig like:

Code:

    <class entity-name="Cromags" name="Person" table="CROMAGS">
        <id name="id" column="id">
            <generator class="native"/>
        </id>
        <property name="age"/>
        <property name="name"/>
     </class>
     
    <class entity-name="Neanderthal" name="Person" table="NEANDERTHALS">
        <id name="id" column="id">
            <generator class="native"/>
        </id>
        <property name="age"/>
        <property name="name"/>
     </class>   


Is there anyway of doing this in the current version of NHibernate? Any help welcome

Cheers
Dunder


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 1:47 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
No, entity-names haven't been ported to NHibernate yet.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 6:37 pm 
Newbie

Joined: Thu Oct 19, 2006 12:08 am
Posts: 2
sergey wrote:
No, entity-names haven't been ported to NHibernate yet.


Thanks for the quick reply sergey. We may have to look at adapting NHibernate to do this.


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

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.