CatalogNameUsageSetting with SelfServing

Posts   
 
    
cerberis
User
Posts: 93
Joined: 20-May-2011
# Posted on: 05-Jul-2011 15:26:38   

Hello,

we used LLBL version (1.0.2005) for a long time. Currently we are trying to migrate to the newest version. Hovewer we are facing problem with catalog name overwriting in selfserving scenario.

With old version we did not had any configuration regarding this, only connection string. As I understand, old version of self serving cleared catalog name by default.

Currently, our migrated code starts adding catalog name to the columns and tables. The problem is that we have many environments with different databases.

I tried to use <add key="CatalogNameUsageSetting" value="2"/>

but seems so that for self serving it has no effect.

Next thing, I tried: <sqlServerCatalogNameOverwrites> <add key="*" value=""/> </sqlServerCatalogNameOverwrites>

which does not have any effect too...

If I add concrete database in sqlServerCatalogNameOverwrites configuration, like <sqlServerCatalogNameOverwrites> <add key="dev-db-01" value=""/> </sqlServerCatalogNameOverwrites>

looks like it is working.. however, entities can be generated on one of many databases... (depends on developer who is generating), so I dont want to have any database lists in config file (it can be a failure in future, when new developer machines are introduced or renamed and so on..) It also introduces additional problem, when deploying to other environments: database name searched and replaced in config file.. so this one will be replaced too...

For me also would be fine possibility to set this from code like in adapter scenario: adapter.CatalogNameUsageSetting = CatalogNameUsage.Clear;

However, I did not found such possibility (maybe looked to wrong place?) simple_smile

So any suggestions about this?

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 05-Jul-2011 22:31:38   

I'm not sure why the wildcard version is not working, when the specific name version does - I'll check for you. In the mean time, would it be possible for you to work from a single development database, or at least get all your developers to use the same name for their databases - it makes life much simpler...!

Matt

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 05-Jul-2011 23:47:29   

It's the exact same code for selfservicing and adapter, so it should work without problems. We'll look into it.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 06-Jul-2011 11:15:41   

Well, the problem is... the '*' wildcard isn't implemented for config based overwrites, only for per-call overwrites (which are only supported on adapter).

It's an easy fix though. I'll add that small feature and will attach a new DQE build for you to test. This will make:

    <sqlServerCatalogNameOverwrites>
        <add key="*" value=""/>
    </sqlServerCatalogNameOverwrites>

work

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 06-Jul-2011 11:42:28   

See the attached DQE for this feature. So you can just define * -> "" overwrites in the config file, and they're picked up.

Frans Bouma | Lead developer LLBLGen Pro
cerberis
User
Posts: 93
Joined: 20-May-2011
# Posted on: 07-Jul-2011 08:51:55   

Otis wrote:

See the attached DQE for this feature. So you can just define * -> "" overwrites in the config file, and they're picked up.

Sorry, for my slow response. Thank you for the fix. Its working well now simple_smile

Temporary I had made custom template for persistence info class generation so that it will not put database name to it. But now its not needed anymore.

Thank you.

cerberis
User
Posts: 93
Joined: 20-May-2011
# Posted on: 13-Jul-2011 07:30:52   

Btw, maybe you also know, when this fix will be available to the public release? simple_smile

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 13-Jul-2011 07:48:31   

cerberis wrote:

Btw, maybe you also know, when this fix will be available to the public release? simple_smile

The next published release will contain this and other fixes. The releases are published quite often. You can subscript to the download rss feed to know when a new release is available simple_smile

David Elizondo | LLBLGen Support Team