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: Interfaces and concrete classes
PostPosted: Mon Mar 05, 2007 5:44 pm 
Newbie

Joined: Thu Mar 01, 2007 1:37 pm
Posts: 7
using using NHib 1.2 CR1 / .Net2.0

Ok, lets say i have an interface
IInventoryItem, and have wired up all my base fields for it.

joined-subclass works great when i have more properties.

However, now I want to create a Basic IInventoryItem which is just a concrete version of IInventoryItem.

so I build my class file, inherit the interface, and NHib complains that there is no explicit map for it. Fine, that's understandable.

However, I attempt to create a map for it, with join-subclass, even though there isn't a real join happening) and it spits out the nasty join syntax on the sql query even though i leave out the table name.

So I try using just plain old subclass. However this fails to work as well, because unless I am missing something, i can't have multiple types of inheritance. I cannot mix subclass and join-subclass.
At least my attempts to use mixed failed because i used a discriminator for the subclass, but not the join-subclass- it did not like that at all.

Am I missing something, or is my only choice to abandon the interface pattern and use abstract base classes instead?


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.