Hey Victor,

Thanks for your answer.

I would have to use a one-to-one mapping, because one Teststep only
has one TeststepData and vice versa. I can't map TeststepData as
component, because Components don't support Inheritance.

So I Would have to map TeststepData to an extra Table and do an one-to-
one mapping to the Teststep class.

Or am I missing something?

On 30 Sep., 10:42, Victor Rosenberg <[email protected]>
wrote:
> Hey
> I would prefer table per class hierarchy. Your classes are very light
> and performance will be good, because NH won't need to do any joins.
>
> I don't have a say about the one-to-one mapping, never got a chance to
> use it...
>
> On Sep 30, 9:40 am, reflection <[email protected]> wrote:
>
>
>
> > Hello =)
>
> > I'm stuck with a little mapping problem and I hope you can help me to
> > map things right. I've got the following class structure:
>
> > class Teststep
> > {
> >   public Decimal TeststepId { get; set; }
> >   public TeststepData Data { get; set; }
>
> >   //some other stuff
>
> > }
>
> > abstract class TeststepData
> > {
> >   //some stuff all TeststepDatas have in common
>
> > }
>
> > class TeststepData1: TeststepData
> > {
> >   public String Description { get; set; }
>
> > }
>
> > public TeststepData2: TeststepData
> > {
> >   public int UpperLimit { get; set; }
> >   public int LowerLimit { get; set; }
>
> > }
>
> > May I do a one-to-one mapping to TeststepData and define TeststepData
> > as Table per Subclass? Would you prefer Table per Subclass or Table
> > per class hierarchy? Or shall I go table per concrete class? Though I
> > think that is a bit messy approach.
>
> > Thanks for your help :)
>
> > Greetings,
> > Reflection- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to