New Posts New Posts RSS Feed: IdeaBlade throws errors that do not identify where the problem is
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

IdeaBlade throws errors that do not identify where the problem is

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: IdeaBlade throws errors that do not identify where the problem is
    Posted: 12-Jul-2007 at 4:31pm

It would be really nice if when an error was thrown from IdeaBlade with a problem saving (PersistenceManagerSaveException), the exception contained the name of the table and/or field that it was trying to update, or the name of the Data class would be helpful also.

 

What we get now is errors that look like the following, where it's almost impossible to determine where the problem is, even if watching the SQL Trace or looking in the DebugLog.xml file.

 

IdeaBlade.Persistence.PersistenceManagerSaveException: Save failed - Table doesn't have a primary key. --->

System.Data.MissingPrimaryKeyException: Table doesn't have a primary key.

   at System.Data.DataTable.FindByPrimaryKey(Object[] values)

   at System.Data.DataRowCollection.Find(Object[] keys)

   at IdeaBlade.Persistence.PersistenceManager.FindEntity(PrimaryKey

pPrimaryKey)

   at IdeaBlade.Persistence.PersistenceManager.GetEntity(PrimaryKey

pPrimaryKey, QueryStrategy pQueryStrategy)

   at IdeaBlade.Persistence.PersistenceManager.GetEntity(PrimaryKey

pPrimaryKey)

   at

IdeaBlade.Persistence.PersistenceManager.GetEntitiesWithErrors(DataSet

pDataSet, Boolean pRemoveFromDataSet)

   at IdeaBlade.Persistence.PersistenceManager.SaveDataSet(IEnumerable

pDataRows, SaveOptions pSaveOptions)

   at IdeaBlade.Persistence.PersistenceManager.DoSaveDataSet(IEnumerable

pDataRows, SaveOptions pSaveOptions)

   --- End of inner exception stack trace ---

   at IdeaBlade.Persistence.PersistenceMa

nager.DoSaveDataSet(IEnumerable pDataRows, SaveOptions pSaveOptions)

   at IdeaBlade.Persistence.PersistenceManager.SaveChanges(IEnumerable

pDataRows, SaveOptions pSaveOptions)

   at IdeaBlade.Persistence.PersistenceManager.SaveChanges()

   at

Wolf.Export.Mapping.Copd.CopdPatient.SaveToDatabase(CopdPatientData

data) in C:\WolfDev\DotNet2\Export2\Mapping\Copd\CopdPatient.cs:line 233

   at Wolf.Export.Mapping.Copd.CopdPatient.ImportPatient(String

fileName, Boolean[] options) in

C:\WolfDev\DotNet2\Export2\Mapping\Copd\CopdPatient.cs:line 201

   at Wolf.Export.Mapping.Copd.Copd.ImportPatient(String fileName, Boolean[] options) in C:\WolfDev\DotNet2\Export2\Mapping\Copd\Copd.cs:line 155

   at Wolf.Export.UI.Steps.IntImportFilter.Import(Copd importengine, PersistenceManager pm, BackgroundWorker w, String file, Int32 pos, Int32

max) in C:\WolfDev\DotNet2\ExportUI\Steps\IntImportFilter.cs:line 319

Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2007 at 4:34pm
In general, when a save error occurs, EntititiesWithErrors will give you all of the information you need to know with respect to the Entity causing the error (including the table name).  However, the exception to this rule occurs when the PersistenceManager encounters a fatal error during the processing of the calculation of EntitiesWithErrors.  In your case, the EntityWithErrors does not have a Primary Key.

 

You should have received an error message from the Object Mapper.  It usually prints an error message when it finds a table with a missing primary key.

 

If you think this analysis is incorrect, please supply us with evidence to the contrary such as a reproducible case.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down