2

Trying to reverse-engineer an existing SQL Server 2017 database, but failed as I tried to evolve the DB.

I used the article at https://www.capableobjects.com/2011/02/27/reverse-engineer-a-database/ .

Initial reverse-engineering worked, I could use the generated classes in the Diagram, add new/delete records etc.

But when I tried to save the Script ("Save script" in the Prototyper) nothing happens. Also adding new Attributes to the classes and pushing "Evolve Database" in the Prototyper does not do anything. There is no visual feedback, e.g. showing a change script, error etc.

Any ideas?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Levend
  • 55
  • 7

1 Answers1

0

In order to save the script back to db - and thus be able to evolve later on - there need to be two administrative tables: ECO_ORMAPPING and ECO_TABLES Does your db have these? If not add them. You can check any other evolve db on columns.

Hans Karlsen
  • 2,275
  • 1
  • 15
  • 15
  • What structure do these table need to have? The mentioned article does not say that these tables have to be created manually. I would expect the "wizard" to do this automatically. – Levend Aug 15 '18 at 07:07
  • I managed to create all the "ECO_" tables from another ECO db (without content of course). "Save script" now populates ECO_TABLES and ECO_ORMAPPING, however whether a change in the DB, neither a change in Modlr is recognized. I always get the message "No update needed!" when pressing "Evolve database"... this is not an intended behavior, is it? – Levend Aug 15 '18 at 12:49
  • After the scripts is in ECO_ORMAPPING - the model you have currently is compared to this - and the difference is the base for updates. A change like adding a persistent attribute in the model should result in a diff. However the other way around - change in db - is not recognized - these changes need to be handled manually. – Hans Karlsen Aug 15 '18 at 13:24
  • Unfortunately neither change is recognized. I added an attribute directly in the DB, evolve does not see this. I added an attribute in the Modlr, evolve doesn't see this either. BTW: I am using MDriven Framework 7.0.0.10255 (latest available build). – Levend Aug 15 '18 at 13:49
  • The first thing I would check is this: Retrieve the content of ECO_ORMAPPING - this is xml. Change the model (add an attribute). Evolve. Retrieve the ECO_ORMAPPING once more. Same? If same - try "save script" once more - retrieve ECO_ORMAPPING. Same? – Hans Karlsen Aug 15 '18 at 14:05
  • Did what you told... no effect. Can I send you the XML files (ORMapping before & after) per E-Mail? – Levend Aug 15 '18 at 15:01
  • Yes send to support at capableobjects.com – Hans Karlsen Aug 16 '18 at 15:55