This is a migrated thread and some comments may be shown as answers.

Flat mapping issue

1 Answer 50 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ujjwal Manna
Top achievements
Rank 1
Ujjwal Manna asked on 22 Jan 2010, 09:38 AM
Hi ,

Presently We have some class  like Name, NameIndividual and EmpIndividual..

Now "NameIndividual" class is vertical mapped with "Name" class.

Now I am trying to create a flat mapping between "EmpIndividual" and "NameIndividual " (Which is vertical mapped with Name class)  and its generated the XML file like below :

 

 

<

 

class name="EmpIndividual" >

 

 

 

<

 

extension key="db-inheritance" value="flat" />

 

 

 

<

 

extension key="class-id" value="1976392684" / >

 

 

 

</

 

class>

 

Please find the class structure in attachment (ClassStructure.jpg)
For this reason the mapping is not working . Can you please tell me how can I do the flat mapping to  a class which is vertically mapped with another class ? Any help will be appreciated

Thanks in advance.

Regards,
Ujjwal

 

 

 

 

 

 

 


 

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 25 Jan 2010, 03:59 PM
Hello Ujjwal Manna,

If I understood you correctly you want to have the NameIndividual and EmpIndividual classes mapped to one table. This is only possible in the table of the Name class as "flat mapping" means that the class values are stored in the table of the base class. If one of the NameIndividual and EmpIndividual classes was deriving from the other, it would be possible to map them (and only them) to one table. However, their base class is Name and thereby they would be mapped to its table.
If this approach suits your needs, change the inheritance strategy for the base class to "default" and for the NameIndividual and EmpIndividual classes to "flat". Hope that helps.

Sincerely yours,
Alexander
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Data Access Free Edition
Asked by
Ujjwal Manna
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or