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

Having problem with round-trip modeling

4 Answers 61 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.
Chris
Top achievements
Rank 1
Chris asked on 12 Aug 2011, 05:48 PM
First of all, thanks for the great product. I was hoping to use OA to my current project but I have some problem.
Please let me explain it below.

Premise
* I have existing project with db data (mysql) already. 
* C# code with hierarchical classes, however, db are stored in flat tables.

Project setup
* Added new "Telerik OpenAccess Domain Model" to read in table entities and every thing seems to read in fine.

What I want.
* OA automatically generates class mapping and I would like use the generated class to replace my original classes and extend them with behaviors.

Problem I need to solve
* Since generated class are flat with no hierarchy, I need to modify them and and round-trip modeling should work.

Solution I'm using.
* Reading the doc, It suggests to use "horizontal" inheritance strategy.
* So I separated out superclass with inheritance, superclasses being "horizontal"

Problems and questions.
* After modifying classes, I tried to save it to db by "Update Database from Model" -> "Migrate Database", but it shows no model has changed. I guess superclasses are just abstract classes and there is no way to represent it in db.

Q1: Is this expected? Then how will round-trip modeling will work if no information saved in db? I thought it will save the info at least in the form of comments to read them back later, otherwise, next time I regenerate the entities, I might have to redo all the work again and it can be quite annoying.

* I added a new property to superclass to see if it sees any changes. But it still doesn't see any changes. I have hard time trying to understance how forward mapping works. I understand that superclasses are just astracts and cannot be represented in the db but adding properties to superclass should be like adding to non-abtract classes, no?
Q2: I guess my case is pretty common and I'm sure I missed some steps but I can't figure out. What am I missing?

I'm looking forward to experiment with OA some more but I'm stuck for now.
Thank you very much for your help.

-chris












4 Answers, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 15 Aug 2011, 10:29 AM
Experimenting some more, I find whole concept of round-trip modeling is quite not working as I expected.
Adding associations to model doesn't get recongnized when "Update database from Model" and few other features especially related to inheritance modeling are not working properly, unless I'm doing something wrong.

I understand that OA is relatively new product but I think OA is quite promising product.
However, before I go on any further, I wish there are some release notes stating what's not working quite yet and when it will be fixed.
I spend this weekend playing with OA and found that it's not quite ready for prime time.
I hope I'm wrong. ^^

Thanks.

0
Nikola
Telerik team
answered on 17 Aug 2011, 04:46 PM
Hi Chris ,

You have gotten it right that in horizontal inheritance the superclasses are not persisted into the database. They should be abstract, but it's not required. If you want each class to be persisted into it's own table you should use vertical inheritance. You can read more about the inheritance strategies here.

Unfortunately the behavior you are experiencing when you add a property to a superclass and nothing is reflected to its descendants is actually a bug. It is already fixed but it will be released with our next service pack.

If you need further information or more detailed explanation don't hesitate to contact us.

All the best and have a nice day,
Nikola
the Telerik team

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

0
Chris
Top achievements
Rank 1
answered on 17 Aug 2011, 06:04 PM
Thanks for the clarification.
I'm looking forward for the next SP release.
Do you know when it will arrive?

Regards,
 
0
Nikola
Telerik team
answered on 19 Aug 2011, 07:17 AM
Hi Chris ,

Unfortunately I am not able to provide an exact date of our service pack release. However what I can tell you is that we have planned to release the Service Pack in early September.

I hope that you continue experimenting with OpenAccess and that you find it fulfilling your needs. You can always depend on our dedicated support guys to do their best in order to solve any troubles you run into.

All the best and have a nice day,
Nikola
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
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Nikola
Telerik team
Share this question
or