CliRefresher

Posts   
 
    
dm.Frank
User
Posts: 21
Joined: 26-Apr-2013
# Posted on: 26-Apr-2013 17:28:14   

Hi,

we want to automate the LLBLGen 4.0 code generation process. So I play a little with CliRefresher and CliGenerator. It seems that both tools can help us. But: Our LLBLGen modell contains 3 logical groups. One for SQL Server entities, one for FoxPro entities and one for entities without any DB. If I run the CliRefresher against the SQL DB it removes all mappings for entities that can't be found in the SQL DB. How can I tune CliRefresher to only do his updates on the entities that matches the DatabaseType?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 26-Apr-2013 17:32:32   

It uses the same refresher as in the designer, so if I may ask, how are you refreshing the model in the designer? I think I don't really follow how you want to refresh foxpro entities as we don't support foxpro db's...

Frans Bouma | Lead developer LLBLGen Pro
dm.Frank
User
Posts: 21
Joined: 26-Apr-2013
# Posted on: 29-Apr-2013 10:08:24   

For FoxPro we're using the driver that was developed by Rushmore. Do you remember? But FoxPro isn't the problem here. We only wan't to automatically update the code for SQL DB. So is there a way to tell the refresher to handle only the SQL Entities?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 29-Apr-2013 16:41:40   

dm.Frank wrote:

For FoxPro we're using the driver that was developed by Rushmore. Do you remember?

Ah yes, rings a bell simple_smile

But FoxPro isn't the problem here. We only wan't to automatically update the code for SQL DB. So is there a way to tell the refresher to handle only the SQL Entities?

The refresher can refresh one db at a time, but all entities have to be mapped onto targets in every DB in the project. So if you have entities mapped to SQL server but not to foxpro, that is indeed a problem, but that will always be a problem, also in the designer (same code) as it has to migrate the model to the new relational model data.

If you have two logical groups, so entities on SQL server, entities on foxpro and entities mapped on nothing (?) you should create 3 projects, 1 with the sql server entities (as they're not mapped onto foxpro, that's not a problem), one with the foxpro entities and one with the entities not mapped onto anything.

Frans Bouma | Lead developer LLBLGen Pro
dm.Frank
User
Posts: 21
Joined: 26-Apr-2013
# Posted on: 14-May-2013 16:01:36   

That's is what I was afraid of. But I did it. Now I have 3 LLBLGen projects. I have to do little corrections to the namespaces and project settings in order to build a solution consisting of this 3 projects. Now I can reference this dll's and data is delivered as expected.

We are rebuilding our old VFP solution module-by-module so I need to use this classes in parallel because new data is stored in SQL and core data is stored in VFP. The core data management will be the last module that will be rebuild.

The problem now is, that we have to separate the using's because of e.g. the EntityCollection-classes that are defined in the HelperClasses. See the following example:


using SD.LLBLGen.Pro.ORMSupportClasses;
using SD.LLBLGen.Pro.QuerySpec;
using SD.LLBLGen.Pro.QuerySpec.Adapter;

using DM.DAL.SQL;
using DM.DAL.SQL.EntityClasses;
using DM.DAL.SQL.HelperClasses;
using DM.DAL.SQL.SQLSpecific;

// SQL access
this.DataContext = SQLAdapter.FetchQuery(SelectFromSql.PflModell.Where(PflModellFields.PflModellAktivBezeichnung != "Neu" & PflModellFields.PflModellAktivBezeichnung != "Test"));

// VFP access
this.DataContext = VFPAdapter.FetchQuery(SelectFromVfp.Adressen.Where(DM.DAL.VFP.HelperClasses.AdressenFields.XadrPlz == 49681));

Is it possible to have an additional project that only contains the shared classes (e.g. HelperClasses)?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 14-May-2013 23:48:07   

The problem is that you are using different model with each database type.

But I don't see an issue since you can use the required Using statement with no issues, or you can choose to use fully qualified names when defining objects without the need for the Usings.