KingdomFirst / Excavator

We have now released Bulldozer on GitHub. Bulldozer is the super-powerful big brother to Excavator. Because Bulldozer is now published on GitHub we will no longer be supporting Excavator. Thank you for all the support here!
https://github.com/KingdomFirst/Bulldozer
19 stars 20 forks source link

EntityValidation Exception: F1 Contributions Import on 4.6 #158

Closed arranf closed 8 years ago

arranf commented 8 years ago
8/18/2016 5:14:40 AM,Transform Data,"System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
   at System.Data.Entity.Internal.InternalContext.SaveChanges()
   at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing)
   at Excavator.F1.F1Component.AddAccount(RockContext lookupContext, String fundName, String accountGL, Nullable`1 fundCampusId, Nullable`1 parentAccountId, Nullable`1 isActive)
   at Excavator.F1.F1Component.MapContribution(IQueryable`1 tableData, List`1 selectedColumns)
   at Excavator.F1.F1Component.TransformData(Dictionary`2 settings)
   at Excavator.ProgressPage.bwImportData_DoWork(Object sender, DoWorkEventArgs e)"

I added in the columns to the F1 DB as suggested in #156

dcs619 commented 8 years ago

Which columns did you have to add?

arranf commented 8 years ago

@dcs619

 [Card_Type] [varchar](50) NULL,
    [Last_Four] [varchar](50) NULL,
    [Fund_Is_active] [bit] NULL,
    [Fund_GL_Account] [varchar](50) NULL,
    [Sub_Fund_GL_Account] [varchar](50) NULL

That got me past the missing Card_Type error but now I'm running into this exception. Unless off the top of your head you know a way to see the inner exception I'll build Excavator and run this as debug.

arranf commented 8 years ago

@dcs619 I've looked at the code it's failing at and I can't see why the account entity would be invalid. None of the fields from the F1 data would be null aside from Sub_Fund_Name which would be cast as a "". Any idea before I invest a little time to step through it.

arranf commented 8 years ago

Fixed