map table to object... i got it i think its called table per class heirarchy...
On Tue, Mar 30, 2010 at 10:21 AM, Fabio Maulo <[email protected]> wrote: > Map what ? > To map obj to table, perhaps, you are missing something. > > 2010/3/29 reggieboy <[email protected]> > > Hello guys i am currently thinking on how to map a database table like >> this >> >> >> create table [User] ( >> Id UNIQUEIDENTIFIER not null, >> RecordVersion INT not null, >> Email NVARCHAR(255) null, >> Password NVARCHAR(255) null, >> UserCategory INT null, >> primary key (Id) >> ) >> >> >> create table Doctor ( >> Id UNIQUEIDENTIFIER not null, >> RecordVersion INT not null, >> Firstname NVARCHAR(255) null, >> Lastname NVARCHAR(255) null, >> Middlename NVARCHAR(255) null, >> Gender INT null, >> Birthdate DATETIME null, >> primary key (Id) >> ) >> >> create table Secretary ( >> Id UNIQUEIDENTIFIER not null, >> RecordVersion INT not null, >> Firstname NVARCHAR(255) null, >> Lastname NVARCHAR(255) null, >> Middlename NVARCHAR(255) null, >> Gender INT null, >> Birthdate DATETIME null, >> primary key (Id) >> ) >> >> alter table Doctor >> add constraint FKCE4594AAF1922C4D >> foreign key (Id) >> references [User] >> >> alter table Secretary >> add constraint FKF4B0E86CF1922C4D >> foreign key (Id) >> references [User] >> >> >> what will the xml mapping file will look like? >> >> can i use polymorphic association with it? >> thanks guys in advance :) >> >> -- >> 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]<nhusers%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> >> > > > -- > Fabio Maulo > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- 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.
