This is a migrated thread and some comments may be shown as answers.

Error on forward mapping

3 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jr
Top achievements
Rank 1
jr asked on 13 Oct 2009, 02:51 PM
I had the application running just fine.
Now, when I try to run forward mapping (from Telerik menu), to update same new classes to the database, I get an error:

Exception:  Item has already been added. Key in dictionary: 'PoloData.LO'  Key being added: 'PoloData.LO'

Generated by the method: Void Insert(System.Object, System.Object, Boolean)

Stack Trace:    at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at System.Collections.Hashtable.Add(Object key, Object value)
   at OpenAccessRuntime.DataObjects.tools.workbench.model.MdDataObjectsFile.addClassesFromCodeModel(MdDocument doc, CodeModel cm)
   at OpenAccessRuntime.DataObjects.tools.workbench.model.MdDataObjectsFile.getDocument()
   at OpenAccessRuntime.DataObjects.tools.workbench.model.MdProject.load(IMappingData[] _mappingData, IDictionary _configProps)
   at Telerik.OpenAccess.Sdk.Addin.UserControls.MdProjectHelper.CreateMdProject(VAProject project)
   at Telerik.OpenAccess.Sdk.Addin.UserControls.MdProjectHelper.GetMdProject(VAProject project)
   at Telerik.OpenAccess.Sdk.Addin.UserControls.NonPersistentUserControl.ActivateUserControl(VAProject _project)
   at Telerik.OpenAccess.Sdk.Addin.UserControls.ClassViewControl.classTreeView_AfterSelect(Object sender, TreeViewEventArgs e)

Exception Type: System.ArgumentException


What are the possible causes of this error? Any idea?

Thanks





3 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 14 Oct 2009, 10:18 AM
Hello jr,

 This might happen if you have the same class specified twice in code(without the 'partial'  keyword) or in the mapping? Can you please verify that? Also does pressing the  'Reload' button on the wizard help?

Regards,
Ady
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
jr
Top achievements
Rank 1
answered on 14 Oct 2009, 10:42 AM
Not really that problem.
I don't why but app.config had 2 classes with the same name.
Sometimes when I change a name of a class, instead of changing in app.config, it inserts a new one.
Working now.
Thanks
0
Ady
Telerik team
answered on 16 Oct 2009, 03:03 PM
Hello jr,

 In case you encounter a similar ambiguity in the mapping you can use the 'Check Settings' wizard to validate the mapping.
Do feel free to get back to us in case you need further assistance.

All the best,
Ady
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
jr
Top achievements
Rank 1
Answers by
Ady
Telerik team
jr
Top achievements
Rank 1
Share this question
or