Mapping inherited data types

0 views
Skip to first unread message

tqwhite

unread,
Mar 10, 2010, 11:48:26 AM3/10/10
to nhusers
I am working with a supplied xsd. I have generated it into a bunch of
data objects. I can manipulate them correctly in code. I am having
trouble getting NH to map them.

The classes are approximately:

partial partial class BaseNameType{ public FirstName; public
LastName; }

public partial class NameOfRecordType : BaseNameType {public
NameOfRecordTypeType Type; }

public partial class StudentPersonalType { public public partial
class StudentPersonalType Name; }

I map it thus:

<property name="Name"
type="AssemblyName.Services.BaseDataObjects.NameOfRecordType,
AssemblyName">
<column name="Type"/>
<column name="LastName"/>
<column name="FirstName"/>
</property>

Now that I am an expert on generating schema from my NH mapping, I am
able to look at what NH thinks it is doing. In this case, it Bombs and
tells me it cannot determine the type of LastName. When I remove the
names, it generates a schema. Especially, it generates the Type
column.

As far as I can figure, this should work. Any thoughts?

tqii

Fabio Maulo

unread,
Mar 10, 2010, 6:08:27 PM3/10/10
to nhu...@googlegroups.com
" I am an expert on generating schema from my NH mapping"
well...
When you put something in the attribute "type" of the node <porperty> you should put a IType implementation or a IUserType implementation (that is not your case).

In you case what you need seems a <component> and not a IUserType.

2010/3/10 tqwhite <tqw...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.




--
Fabio Maulo

tqwhite

unread,
Mar 11, 2010, 10:47:22 AM3/11/10
to nhusers
I meant, NOT an expert. Big typo. But, considering the other dopey
questions you've helped me with lately, I'm guessing you were being
ironic in your quote. You can be under no illusions about my expertise
at this stage.

LOL

Sorry if it was irritating to you.

tqii

On Mar 10, 5:08 pm, Fabio Maulo <fabioma...@gmail.com> wrote:
> " I am an expert on generating schema from my NH mapping"
> well...
> When you put something in the attribute "type" of the node <porperty> you
> should put a IType implementation or a IUserType implementation (that is not
> your case).
>
> In you case what you need seems a <component> and not a IUserType.
>

> 2010/3/10 tqwhite <tqwh...@gmail.com>

> > nhusers+u...@googlegroups.com<nhusers%2Bunsu...@googlegroups.com >

Fabio Maulo

unread,
Mar 11, 2010, 11:05:23 AM3/11/10
to nhu...@googlegroups.com
irritating ?

Don't worry, when I'll feel hurt you will know.
I'll send you : "una proposta che non si puó rifiutare!"

2010/3/11 tqwhite <tqw...@gmail.com>
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.




--
Fabio Maulo

Reply all
Reply to author
Forward
0 new messages