(fix) adpated previous commit for v2 non-single instance store

pull/230/head
Ludovic Marcotte 2016-11-21 10:00:01 -05:00
parent 8cb6061b55
commit 01b0b5f783
1 changed files with 6 additions and 15 deletions

View File

@ -1264,21 +1264,12 @@ andAttribute: (EOAttribute *)_attribute
attribute = [self _attributeForColumn: @"c_name"];
nowDate = [NSCalendarDate date];
if ([GCSFolderManager singleStoreMode])
touchSql = [NSString stringWithFormat: @"UPDATE %@ SET c_lastmodified = %u WHERE c_name = %@ AND c_folder_id = %@",
table,
(unsigned int) [nowDate timeIntervalSince1970],
[self _formatRowValue: _name
withAdaptor: [adaptorCtx adaptor]
andAttribute: attribute],
folderId];
else
touchSql = [NSString stringWithFormat: @"UPDATE %@ SET c_lastmodified = %u WHERE c_name = %@",
table,
(unsigned int) [nowDate timeIntervalSince1970],
[self _formatRowValue: _name
withAdaptor: [adaptorCtx adaptor]
andAttribute: attribute]];
touchSql = [NSString stringWithFormat: @"UPDATE %@ SET c_lastmodified = %u WHERE c_name = %@",
table,
(unsigned int) [nowDate timeIntervalSince1970],
[self _formatRowValue: _name
withAdaptor: [adaptorCtx adaptor]
andAttribute: attribute]];
[channel evaluateExpressionX: touchSql];