Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Hard coded database name in PersistanceInfoProvider
 

Pages: 1
Bugs & Issues
Hard coded database name in PersistanceInfoProvider
Page:1/1 

  Print all messages in this thread  
Poster Message
nirataro
User



Location:

Joined on:
14-Jun-2006 16:35:00
Posted:
5 posts
# Posted on: 14-Jun-2006 16:41:15.  
Why does the database name hard-coded in the element mapping in PersistanceInfoProvider.cs ?

We are using multiple version of database names for testing, staging and production and code like this

base.AddElementMapping( "CaseDocumentEntity", "AIESECNG_LAUNCH", @"dbo", "CaseDocument", 4 );

is making switching database name on the fly really difficult.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37803 posts
# Posted on: 14-Jun-2006 16:57:09.  
You should use catalog name overwriting or schema name overwriting. See docs -> Using the generated code - Application configuration through .config files. This is already implemented since 1.0.2004.2

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Brandt
User



Location:

Joined on:
04-Apr-2007 17:43:03
Posted:
142 posts
# Posted on: 05-Oct-2007 15:16:31.  
Otis wrote:
You should use catalog name overwriting or schema name overwriting. See docs -> Using the generated code - Application configuration through .config files. This is already implemented since 1.0.2004.2



Is there a way to change the database name in the designer with out having to recreate the project?
Brandt  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14569 posts
# Posted on: 05-Oct-2007 15:35:16.  
Quote:
Why does the database name hard-coded in the element mapping in PersistanceInfoProvider.cs ?

Because LLBLGen Pro enables you to map entities from more than one catalog/database, that's why the catalog/database name is maintained/hardcoded in code, to track back which catalog does the field/table belong.

Quote:
Is there a way to change the database name in the designer with out having to recreate the project?

You can rename the catalog in the Catalog Explorer.
But why don't you use catalog name overwrites in your application config file, at least you won't need to regenerate the code and rebuild it.


  Top
Brandt
User



Location:

Joined on:
04-Apr-2007 17:43:03
Posted:
142 posts
# Posted on: 05-Oct-2007 15:37:45.  
Quote:
Quote:
Is there a way to change the database name in the designer with out having to recreate the project?

You can rename the catalog in the Catalog Explorer.
But why don't you use catalog name overwrites in your application config file, at least you won't need to regenerate the code and rebuild it.



One less web config line to get the support personel confused, and a internal struggle to make everything perfect. I will check out the catalog explorer renaming. Thanks Walaa
Brandt  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.