Monotone-Parent: 7bc959b7bdbff70b4793f01076b797130e83fd01

Monotone-Revision: 56f8217cb19f50d50429b4f745548b63bd418877

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-13T14:35:00
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2012-08-13 14:35:00 +00:00
parent b3c66a0996
commit a224a100db
4 changed files with 26 additions and 8 deletions
+8 -4
View File
@@ -391,7 +391,7 @@ static EOAttribute *textColumn = nil;
EOAdaptor *adaptor;
EOAdaptorChannel *channel;
NSInteger creationDateValue, lastModifiedValue, deletedValue;
NSString *tableName, *pathValue, *propsValue;
NSString *tableName, *pathValue, *parentPathValue, *propsValue;
NSException *result;
if (!initialized)
@@ -440,14 +440,18 @@ static EOAttribute *textColumn = nil;
{
ASSIGN (creationDate, now);
creationDateValue = (NSInteger) [creationDate timeIntervalSince1970];
parentPathValue = [adaptor formatValue: [container path]
forAttribute: textColumn];
if (!parentPathValue)
parentPathValue = @"NULL";
sql = [NSString stringWithFormat:
(@"INSERT INTO %@"
@" (c_path, c_type, c_creationdate, c_lastmodified,"
@" (c_path, c_parent_path, c_type, c_creationdate, c_lastmodified,"
@" c_deleted, c_version, c_content)"
@" VALUES (%@, %d, %d, %d, 0, 0, %@"
@" VALUES (%@, %@, %d, %d, %d, 0, 0, %@"
@")"),
tableName,
pathValue, objectType,
pathValue, parentPathValue, objectType,
creationDateValue, lastModifiedValue,
propsValue];
isNew = NO;