File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ + (void)postChangeNotificationWithChangedFields:(NSSet *)changedFields;
1414+ (void )dataChangedExternally ;
1515@end
1616
17- @interface FCModelDatabase ()
17+ @interface FCModelDatabase () {
18+ uint32_t changeCounterBeforeBlock; // ivar instead of local so nested inDatabase calls work without mistakenly invoking dataChangedExternally
19+ }
20+
1821- (uint32_t )sqliteChangeCount ;
1922- (BOOL )sqliteChangeTrackingIsActive ;
2023@property (nonatomic ) int32_t expectedChangeCount;
@@ -133,7 +136,7 @@ - (void)inDatabase:(void (^)(FMDatabase *db))block
133136
134137 FMDatabase *db = self.database ;
135138 BOOL hadOpenResultSetsBefore = db.hasOpenResultSets ;
136- uint32_t changeCounterBeforeBlock = [self sqliteChangeCount ];
139+ changeCounterBeforeBlock = [self sqliteChangeCount ];
137140
138141 block (db);
139142
You can’t perform that action at this time.
0 commit comments