Reverse mapping merge updates

2 posts, 1 answers
  1. Robert Lautenbach
    Robert Lautenbach avatar
    18 posts
    Member since:
    Dec 2009

    Posted 02 Mar 2010 Link to this post

    I am working towards generating fresh classes from an existing database schema using the reverse mapping IDE tool. I noticed though that database table foreign key relationship changes do not seem to show up in "merge" updates. New foreign key entries seem to show up. But changes do not.

    Is that expected behavior? Is there any way that I can bring in changed foreign keys without wiping out all my customized configuration settings?
  2. Answer
    Ady avatar
    588 posts

    Posted 04 Mar 2010 Link to this post

    Hello Robert Lautenbach,

     Currently changed Foreign keys are not merged. We are working on a completely different and better approach for the Q1 release and this would be supported. As a workaround you could do the following to get your changed FK merged into your existing settings:
    1. Open the reversemapping.config file and locate the table to which the constraint belongs. Locate the relevant <constraint> node within this table node. For example:                                              <constraint name="FK_Products_Categories" table="'Products'" dest="'Categories'">
                          <column name="CategoryID" />
    2. The change in the constraint could be an addition/removal of a FK column or maybe it now points to another table. There would be a reference field corresponding to this constraint in the <class> node. Using the example Northwind example above - a category field of type Category. Please remove the entire <field> node.
    3. Now perform a merge. The wizard will detect the FK constraint as a new constraint and add a corresponding reference field. You might have to confirm the column mapping for this reference field.

     Hope this helps
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top