From d05e1fed5de900640a7383f269c9d29e87b3b278 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 14 Sep 2018 13:27:35 -0400 Subject: [PATCH] Fix SQL inserts in single-store mode --- SOPE/GDLContentStore/GCSFolder.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SOPE/GDLContentStore/GCSFolder.m b/SOPE/GDLContentStore/GCSFolder.m index 0e0e21bee..8ea371879 100644 --- a/SOPE/GDLContentStore/GCSFolder.m +++ b/SOPE/GDLContentStore/GCSFolder.m @@ -684,6 +684,12 @@ andAttribute: (EOAttribute *)_attribute if (!sqlType) sqlType = [self _sqlTypeForColumn: _field withFieldInfos: [folderInfo fields]]; + if (!sqlType && [_field isEqualToString: @"c_folder_id"]) + // The c_folder_id column used in single-store mode is not defined + // in the OCS files; return the definition from the c_version column + // which uses the same data type. + sqlType = [self _sqlTypeForColumn: @"c_version" + withFieldInfos: [folderInfo fields]]; if (sqlType) { attribute = AUTORELEASE([[EOAttribute alloc] init]);