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

Updating base classes not refreshing inherited classes in designer

3 Answers 85 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jason
Top achievements
Rank 1
Jason asked on 12 Aug 2011, 06:12 AM
I have been playing with inheritance in the rlinq designer. The problem i am having is that if I update the base class (e.g. add a new field), the change is not propagated to the inheriting class.

For example, if I have a base class of 'Animal' with 1 propery of 'Name', this being inherited by class 'Dog'. If I add the field 'Age'  to the 'Animal' class, there seems no way to propagate this to the 'Dog' class.

The only way i have worked out so far is to delete the 'Dog' class and re-add it. This sometimes causes issues when i try to map to a table. I will get "An item with the same key has already been added" error.

3 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 12 Aug 2011, 05:27 PM
Hello Jason,

 Unfortunately our inheritance support in the designer is not full at the moment and this is one of the missing parts(adding as well as renaming base class properties does not update the inheritors) and the workaround at the moment is to delete the inheritance relationship and re-create it. You do not have to delete the whole Dog class, only the inheritance relationship and re-drag it from the toolbox.

All the best,
Zoran
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Jason
Top achievements
Rank 1
answered on 13 Aug 2011, 07:11 AM
thanks for the reply Zoran

unfortunately when i do what you suggested it does not seem to completely fix the issue. Yes i can remove the inheritance, make the changes and then re set up the inheritance and the designer shows the correct information. but this sometimes leaves me with many errors. When i investigated further by opening the .rlinq file as xml, it seems the  "<orm:class..." holds copies of both the old and the new versions of the changes i made. For example I had a field "rv" to hold the row version, I changed it from "rv" to "RV" now the "<orm:Class" in the xml holds both and obviously generates errors when trying to compile.

This in itself wouldnt be an issue as I could just delete the "rv" propery in the xml. however there are other links to this property and (row versioning etc) and this basically means i have to revert to an older version of the file and try again as I cant fix all the issues.

any advice would be greatly appriciated

Jason
0
Zoran
Telerik team
answered on 17 Aug 2011, 04:23 PM
Hello Jason,

 You are right, with renaming a base class field is problematic with horizontal inheritance and might require deleting the whole entity and re-creating it. You can delete only the inheritance relationship as well but only prior to renaming the property. After doing all the required operations you can re-create the inheritance relation. All these problems should be there only in the cases where you have horizontal inheritance strategy, vertical and flat should not have any impact from editing the base class.

These issues are known to us but, we have not addressed them yet as there is some higher priority development at the moment and the workarounds are available. However you can be sure that all these issues will be addressed for one of our next releases in the near future. I sincerely apologize for the headaches they might have caused you.

All the best,
Zoran
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
Design Time (Visual Designer & Tools)
Asked by
Jason
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Jason
Top achievements
Rank 1
Share this question
or