Flat mapping issue

Thread is closed for posting
2 posts, 0 answers
  1. Ujjwal Manna
    Ujjwal Manna avatar
    8 posts
    Member since:
    Dec 2009

    Posted 22 Jan 2010 Link to this post

    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" / >








    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.










  2. Alexander
    Alexander avatar
    727 posts

    Posted 25 Jan 2010 Link to this post

    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,
    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.
Back to Top