|
JD
|
Posted 2010-08-02 13:52:06
|
|
Group: Forum Members
Last Active: 2011-04-21 12:21:00
Posts: 12,
Visits: 36
|
Hi, I have taken a bold model and imported the bld file using ECO5 (vs2008).
I then spent most of the day fixing the model but have now got no more errors when validating it.
I have set up the PMP to point to a firebird connection and set up the database connection string.
I tried pressing "evolve" (as my bold database does not have the ECO mapping tables), and I get
Schema Evolution| Database (persistenceMapperFirebird1 [Eco.Persistence.PersistenceMapperFirebird]) has no mapping information. Use the "Save Mapping Information" tool (with a model and mapping that matches the current database) to insert mapping information in the database.
I then tried "save OR mapping information to DB", thinking that would create the mapping tables (I have no idea what this does) and yet again I get another error:
| System.InvalidOperationException: Failed to read discriminators from database, required for classes: BusinessClassesRoot, AllItemsLink, AuthentifiableObject, AuthentifiableObjectUserRoleAdd, AuthentifiableObjectUserRoleRemove, AuthentificationRole...
| Error executing query: Dynamic SQL Error
| SQL error code = -204
| Table unknown
| ECO_TYPE
| At line 1, column 33
| SQL: SELECT CLASSNAME, ECO_TYPE FROM ECO_TYPE
| ---> Eco.Persistence.Connection.DatabaseOperationFailedException: Error executing query: Dynamic SQL Error
| SQL error code = -204
| Table unknown
| ECO_TYPE
| At line 1, column 33
| SQL: SELECT CLASSNAME, ECO_TYPE FROM ECO_TYPE ---> FirebirdSql.Data.FirebirdClient.FbException: Dynamic SQL Error
| SQL error code = -204
| Table unknown
| ECO_TYPE
| At line 1, column 33 ---> Dynamic SQL Error
| SQL error code = -204
| Table unknown
| ECO_TYPE
| At line 1, column 33
| --- End of inner exception stack trace ---
| at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior)
| at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBehavior behavior)
| at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
| at Eco.Persistence.Connection.AbstractIQueryImpl.CreateReader() in e:\dev\fbuild\source\Eco\Eco.Persistence\Connection\DatabaseImpl.cs:line 974
| --- End of inner exception stack trace ---
| at Eco.Persistence.Connection.AbstractIQueryImpl.CreateReader() in e:\dev\fbuild\source\Eco\Eco.Persistence\Connection\DatabaseImpl.cs:line 980
| at Eco.Persistence.Connection.AbstractIQueryImpl.Eco.Persistence.Connection.IDataSet.Open() in e:\dev\fbuild\source\Eco\Eco.Persistence\Connection\DatabaseImpl.cs:line 717
| at Eco.Persistence.ORMapping.DefaultORMappingBuilder.GetDiscriminatorValuesFromConnection(IDatabase db) in e:\dev\fbuild\source\Eco\Eco.Persistence\ORMapping\DefaultORMappingBuilder.cs:line 1041
| at Eco.Persistence.ORMapping.DefaultORMappingBuilder.Initialize(IEcoTypeSystem typeSystem, IDatabase db, SqlDatabaseConfig config, Boolean addMissingTypes) in e:\dev\fbuild\source\Eco\Eco.Persistence\ORMapping\DefaultORMappingBuilder.cs:line 1123
| --- End of inner exception stack trace ---
| at Eco.Persistence.ORMapping.DefaultORMappingBuilder.Initialize(IEcoTypeSystem typeSystem, IDatabase db, SqlDatabaseConfig config, Boolean addMissingTypes) in e:\dev\fbuild\source\Eco\Eco.Persistence\ORMapping\DefaultORMappingBuilder.cs:line 1143
| at Eco.Persistence.PersistenceMapperDb.SaveMappingInfo(ITypeSystemService typeSystemService) in e:\dev\fbuild\source\Eco\Eco.Persistence\PersistenceMapperDb.cs:line 350
| at Eco.Persistence.Design.SaveMappingInfoTool.DoExecute(ExecuteArgs executeArgs)
| at Eco.Persistence.Design.DBToolBase.Execute(ExecuteArgs executeArgs)
Any ideas?
JD.
Ps. I did try reverse engineering from the database but that killed visual studio on pressing the test button on the "reverse engineer" dialog.
|
|
HansKarlsen
|
Posted 2010-08-02 15:50:36
|
|
Group: Administrators
Last Active: Yesterday @ 18:25:39
Posts: 446,
Visits: 2 654
|
If you want to run eco against old Bold databases you need to do some settings in the Eco persistence mapper.In the PersistenceMapperProvider change SqlDatabaseconfig SystemTableprefix from ECO to BOLD for starters. As you have been talking to Peter on Skype I know that you have done this and it still looks for ECO_TYPE and I cannot currently explain that...
|
|
JD
|
Posted 2010-08-03 14:13:03
|
|
Group: Forum Members
Last Active: 2011-04-21 12:21:00
Posts: 12,
Visits: 36
|
Just to follow up, with the help of Hans (and initially Pete):
Took a bold model and imported into ECO 5. I had the tweak the model as I got errors such as
1) Single embedded links in A and B not allowed
2) Some of the associations had the same name as classes (duplicated classes error)
3) Removed nearly all the methods as I did not need them and also widestring parameters were not converted to string
4) Removed some of the derived attributes as not needed
For point 3: Hans did mention I could have done the following:
Import the bld file and open up the EcoSpaceDebugger for modlr and search Method.allinstances - you get them in a list...
You could go Method.allinstances->first().Delete (EcoActionLang) and just hit that button until they are all gone)
As I was using ECO5 there was not working as it was looking for ECO_TYPE Columns and the table ECO_TYPE.
In the firebird in the PMP, changed SqlDatabaseconfig SystemTableprefix to BOLD (from ECO)
and the following code (provided by Hans) was inserted:
public TestProjectPMP() : base()
{
this.InitializeComponent();
forceset();
}
public void forceset()
{
Eco.Persistence.ORMapping.DefaultORMappingBuilder ormb =
(this.persistenceMapperFirebird1.EffectiveRunTimeMappingProvider as Eco.Persistence.ORMapping.DefaultORMappingBuilder);
ormb.TypeTableName = "BOLD_TYPE"; // do not localize
ormb.TypeColumnName = "BOLD_TYPE"; // do not localize
ormb.TablesTableName = "BOLD_TABLES"; // do not localize
ormb.IdColumnName = "BOLD_ID"; // do not localize
}
I believe this will be fixed in ECO6.
Hope this helps others.
|
|
HansKarlsen
|
Posted 2010-08-03 15:49:32
|
|
Group: Administrators
Last Active: Yesterday @ 18:25:39
Posts: 446,
Visits: 2 654
|
Yep, In Eco6 you can set CompatibleMode=Bold to have the setting the correct way to start a Bold generated database. Thank you for doing the summation!
|
|
pistacho
|
Posted 2011-09-12 12:32:07
|
|
Group: Forum Members
Last Active: Yesterday @ 15:42:45
Posts: 191,
Visits: 7 888
|
HansKarlsen (2010-08-03) Yep, In Eco6 you can set CompatibleMode=Bold to have the setting the correct way to start a Bold generated database. Thank you for doing the summation!Hi Hans, Does it work with PersistenceMapperXml? I have an application made with Bold with PersistenceMapperXML. Now I want to read the data in order to transfer it to ECO, but I get this error: Exception in Displayqueue, Check inner exception for info {"It's not possible to know the application caller identity"} (Translate from Spanish to English) Regards, José María Sanmartín
|