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.  [ 2 posts ] 
Author Message
 Post subject: NHibernate discriminator question
PostPosted: Wed Mar 04, 2009 9:55 pm 
Newbie

Joined: Wed Aug 27, 2008 9:08 pm
Posts: 4
version 1.1
Any ideas from anyone?



Hi all,

I have a question regarding subclassing in NHibernate using discriminators. My problem is that the discriminator I need to use is not a simple property of the parent class but rather is a property of one of the many to one properties of the parent class. How can I use a discriminator in this situation.

I can't just say something like <discriminator column="HouseID" /> because House is a many to one property. I need to do something like the following:

<discriminator column="House.ManufacturerID" /> How can I do this?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 12:51 pm 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Can you give us some more information about the domain model ? Normally the descriptor is an "artificial" column which just represents the classes. It's simply a value in the mapping and normaly doesn't appear in your code.

_________________
--Wolfgang


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.