Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> Issue with refreshing a catalog "An item with the same key has already been added."
 

Pages: 1
Designer
Issue with refreshing a catalog "An item with the same key has already been added."
Page:1/1 

  Print all messages in this thread  
Poster Message
bclubb
User



Location:
Norman, Oklahoma
Joined on:
12-Feb-2004 22:18:04
Posted:
934 posts
# Posted on: 04-Jan-2011 16:36:19.  
We are using 2.6 October 2009 build, just downloaded from the site. When we refresh an existing project against the database we are getting this exception.

If I create a new project I am able to bring in all entities. I'm working through the things we've added to the project, but thought that you might be able to point me in the best direction as far as what to look for with relationships that would be causing duplicate keys.

I can send you a schema and the project file if needed also. Just let me know the preferred method.


Code:

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 SD.LLBLGen.Pro.ApplicationCore.Entities.EntityRelationCollection.BuildCacheForContains()
at SD.LLBLGen.Pro.ApplicationCore.Entities.EntityContainer.ConstructRelations(EntityDefinition entityToUpdate, Int32 recursionDepth)
at SD.LLBLGen.Pro.ApplicationCore.Entities.EntityDefinition.MapField(IEntityFieldMapTargetElement targetField, ProjectProperties properties)
at SD.LLBLGen.Pro.ApplicationCore.CatalogRefresher.MigrateEntityFields(EntityDefinition entity)
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 SD.LLBLGen.Pro.Gui.Forms.MainWindow._menuItemProjectRefreshCatalogsUnattended_Click(Object sender, EventArgs e)
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.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
  Top
bclubb
User



Location:
Norman, Oklahoma
Joined on:
12-Feb-2004 22:18:04
Posted:
934 posts
# Posted on: 04-Jan-2011 16:59:12.  
Something interesting. I changed the project and saved and it mentioned that the file was saved with 2.5. So we reinstalled 2.5 and did a refresh and didn't receive a problem.

  Top
MTrinder
User



Location:
London by day, Milton Keynes by night.
Joined on:
08-Oct-2008 17:55:47
Posted:
1461 posts
# Posted on: 04-Jan-2011 21:21:33.  
Certainly looks like it's trying to add 2 relations with the same name, but I'm pretty sure that SQL doesn't let that situation arise.

If you could send us the project file and schema script we'll look at recreating this for ourselves.

Thanks

Matt
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37803 posts
# Posted on: 05-Jan-2011 11:18:46.  
Please use the latest v2.6 build and try again. October 2009 is the latest v2.6 build.

I do recall some problems with that method when it was initially added (to prevent long winded m:n discovery), but we haven't seen any reports about this since it was added (in April 2009)


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


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

Version: 2.1.12172008 Final.