Schema name change

Posts   
 
    
scotru
User
Posts: 104
Joined: 16-Feb-2006
# Posted on: 07-Apr-2013 01:56:08   

Ok, I have a very old project I'm upgrading from LLBLGen 1.1. When I go to refresh the catalog in 2.6 (I thought I'd upgrade one major version at a time), the schema name has changed (perhaps a provider version difference? I'm using MySQL with the CoreLabs/DevArt providers). In 1.1, the schema name comes in as "Default" but in 2.6, it shows up as the same as the database name. Problem is LLBLGen then decided to drop all the Entities from my project because the old schema (Default) is missing.

Is there some way I can rename the schema in LLBLGen or map the tables to the new schema? I've got a lot of customization on the tables in my LLBLGen project so I don't want to start the project over.

I'm using Final releases of both 1.1 and 2.6.

scotru
User
Posts: 104
Joined: 16-Feb-2006
# Posted on: 08-Apr-2013 01:45:01   

Ok, I figured out that I can rename the schema in LLBLGen just by right clicking on that. So I tried doing that in the catalog before refreshing in 2.6 Now, I'm getting this exception:

An item with the same key has already been added.

-----[Core exception]--------------------
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at SD.LLBLGen.Pro.ApplicationCore.Entities.EntityRelationCollection.BuildCacheForContains()
   at SD.LLBLGen.Pro.ApplicationCore.Entities.EntityContainer.ConstructRelations(EntityDefinition entityToUpdate, Int32 recursionDepth)
   at SD.LLBLGen.Pro.ApplicationCore.CatalogRefresher.MigrateEntities()
   at SD.LLBLGen.Pro.ApplicationCore.CatalogRefresher.MigrateProjectToNewCatalog(Boolean isUnattended, SelectTargetsForOrphanedElementsCallBack targetSelectCallBack)
   at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshCatalogs(Boolean unattended, Hashtable catalogsToRefresh)
   at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshAllCatalogs(Boolean unattended)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This is final build for version 2.6.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 08-Apr-2013 05:34:42   

Still, please post the LLBLGen v2.6 you have (you can see it at the Designer's window title).

Do you have a self-join, or some kind of illegal FK at your db? Maybe that is the cause, but no sure.

and.. please create a post in the HelpDesk forum and attach your .llblgenproj file to it so we can take a look at it.

David Elizondo | LLBLGen Support Team
scotru
User
Posts: 104
Joined: 16-Feb-2006
# Posted on: 08-Apr-2013 06:15:22   

Version 2.6 October 9th, 2009

I uploaded the LLBLGen project file to helpdesk.

I believe I have a self-join on one table. Is this not allowed? I used it fine in 1.1

scotru
User
Posts: 104
Joined: 16-Feb-2006
# Posted on: 08-Apr-2013 09:26:01   

I tried removing the entity with the self-reference but still get the same exception when refreshing the catalog.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 08-Apr-2013 11:12:21   

Continued in helpdesk thread.

Frans Bouma | Lead developer LLBLGen Pro
scotru
User
Posts: 104
Joined: 16-Feb-2006
# Posted on: 12-Apr-2013 07:58:46   

Issue was traced to duplicate relations in the designer. Removing the duplicate relations resolved the issue. Thanks for great support Otis!