This question is locked. New answers and comments are not allowed.
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
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