Hi,

Do you need lazy loading of the Teststeps Data? (some mappings will make NH do 
an outer join others will make NH do a select, and later select the lazy loaded 
side when accessed).

What about the lifecycle of TestData, is it a standalone 'thing', or is it 
always used in concert with its Teststep (and therefore owned by Teststep)?

You need answers to these questions before you can choose between the different 
1-2-1 relations in NH

Also using inheritance to model TestData will limit your possibilities, because 
components doesn't support inheritance, so you need to map TestData as a 
persistent class with its own table(s).e
/M

BTW: Decimal seems an odd type for the Id property?


>-----Original Message-----
>From: [email protected] [mailto:[email protected]] On Behalf
>Of reflection
>Sent: Wednesday, September 30, 2009 9:41 AM
>To: nhusers
>Subject: [nhusers] One-to-one mapping appropiate?
>
>
>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
>

--~--~---------~--~----~------------~-------~--~----~
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