mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-15 08:01:40 +00:00
* EOAccess/EODatabase.[hm]
add -forgetSnapshotForSourceGlobalID:relationshipName: * EOAccess/EODatabaseContext.[hm] add -forgetSnapshotForSourceGlobalID:relationshipName: add -refaultObject:withSourceGlobalID:relationshipName:editingContext: add -clearOriginalSnapshotForObject:sourceGlobalID:relationshipName:editingContext: add -_turnToArrayFault:sourceGID:relationshipName:editingContext:isComplete: * EOControl/EOCustomObject.m fix -validateValue:forKey: fix -validateValue:forKey:error: fix -addObject:toPropertyWithKey: fix -removeObject:object fromPropertyWithKey: * EOControl/EOEditingContext.[hm] add -refaultObject:withSourceGlobalID:relationshipName:editingContext: * EOControl/EONSAddOns.[hm] add -performSelector:withPointer: * EOControl/EOObjectStore.[hm] add -refaultObject:withSourceGlobalID:relationshipName:editingContext: add -clearOriginalSnapshotForObject:sourceGlobalID:relationshipName:editingContext: * EOControl/EOObjectStoreCoordinator.m add -refaultObject:withSourceGlobalID:relationshipName:editingContext: add -clearOriginalSnapshotForObject:sourceGlobalID:relationshipName:editingContext: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@38006 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3425fb640b
commit
339febaebc
13 changed files with 296 additions and 6 deletions
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
||||||
|
2014-07-24 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||||
|
* EOAccess/EODatabase.[hm]
|
||||||
|
add -forgetSnapshotForSourceGlobalID:relationshipName:
|
||||||
|
* EOAccess/EODatabaseContext.[hm]
|
||||||
|
add -forgetSnapshotForSourceGlobalID:relationshipName:
|
||||||
|
add -refaultObject:withSourceGlobalID:relationshipName:editingContext:
|
||||||
|
add -clearOriginalSnapshotForObject:sourceGlobalID:relationshipName:editingContext:
|
||||||
|
add -_turnToArrayFault:sourceGID:relationshipName:editingContext:isComplete:
|
||||||
|
* EOControl/EOCustomObject.m
|
||||||
|
fix -validateValue:forKey:
|
||||||
|
fix -validateValue:forKey:error:
|
||||||
|
fix -addObject:toPropertyWithKey:
|
||||||
|
fix -removeObject:object fromPropertyWithKey:
|
||||||
|
* EOControl/EOEditingContext.[hm]
|
||||||
|
add -refaultObject:withSourceGlobalID:relationshipName:editingContext:
|
||||||
|
* EOControl/EONSAddOns.[hm]
|
||||||
|
add -performSelector:withPointer:
|
||||||
|
* EOControl/EOObjectStore.[hm]
|
||||||
|
add -refaultObject:withSourceGlobalID:relationshipName:editingContext:
|
||||||
|
add -clearOriginalSnapshotForObject:sourceGlobalID:relationshipName:editingContext:
|
||||||
|
* EOControl/EOObjectStoreCoordinator.m
|
||||||
|
add -refaultObject:withSourceGlobalID:relationshipName:editingContext:
|
||||||
|
add -clearOriginalSnapshotForObject:sourceGlobalID:relationshipName:editingContext:
|
||||||
2014-06-03 Manuel Guesdon <mguesdon@orange-concept.com>
|
2014-06-03 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||||
* EOAccess/EOAccessFault.m
|
* EOAccess/EOAccessFault.m
|
||||||
remove empty init methods
|
remove empty init methods
|
||||||
|
|
|
@ -122,6 +122,9 @@ GDL2ACCESS_EXPORT NSTimeInterval EODistantPastTimeInterval;
|
||||||
|
|
||||||
- (void)forgetSnapshotsForGlobalIDs: (NSArray *)gids;
|
- (void)forgetSnapshotsForGlobalIDs: (NSArray *)gids;
|
||||||
|
|
||||||
|
- (void) forgetSnapshotForSourceGlobalID:(EOGlobalID *)gid
|
||||||
|
relationshipName: (NSString *)name;
|
||||||
|
|
||||||
- (void)forgetAllSnapshots;
|
- (void)forgetAllSnapshots;
|
||||||
|
|
||||||
- (void)recordSnapshots: (NSDictionary *)snapshots;
|
- (void)recordSnapshots: (NSDictionary *)snapshots;
|
||||||
|
|
|
@ -603,6 +603,22 @@ static NSMutableArray *databaseInstances;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void) forgetSnapshotForSourceGlobalID:(EOGlobalID *)gid
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
{
|
||||||
|
NSMutableDictionary *toMany = nil;
|
||||||
|
|
||||||
|
NSAssert(gid,@"No Source Global ID");
|
||||||
|
NSAssert(name,@"No relationship name");
|
||||||
|
|
||||||
|
toMany = [_toManySnapshots objectForKey: gid];
|
||||||
|
|
||||||
|
if (toMany)
|
||||||
|
[toMany removeObjectForKey: name];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)forgetAllSnapshots
|
- (void)forgetAllSnapshots
|
||||||
{
|
{
|
||||||
NSMutableSet *gidSet = [NSMutableSet new];
|
NSMutableSet *gidSet = [NSMutableSet new];
|
||||||
|
|
|
@ -201,6 +201,15 @@ struct _EOTransactionScope;
|
||||||
- (NSArray *)objectsForSourceGlobalID: (EOGlobalID *)globalID
|
- (NSArray *)objectsForSourceGlobalID: (EOGlobalID *)globalID
|
||||||
relationshipName: (NSString *)name
|
relationshipName: (NSString *)name
|
||||||
editingContext: (EOEditingContext *)context;
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
|
- (void) forgetSnapshotForSourceGlobalID: (EOGlobalID*)globalID
|
||||||
|
relationshipName: (NSString *)name;
|
||||||
|
|
||||||
|
- (void) clearOriginalSnapshotForObject: (NSArray*)object
|
||||||
|
sourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
- (void)_registerSnapshot: (NSArray *)snapshot
|
- (void)_registerSnapshot: (NSArray *)snapshot
|
||||||
forSourceGlobalID: (EOGlobalID *)globalID
|
forSourceGlobalID: (EOGlobalID *)globalID
|
||||||
relationshipName: (NSString *)name
|
relationshipName: (NSString *)name
|
||||||
|
@ -210,6 +219,16 @@ struct _EOTransactionScope;
|
||||||
withGlobalID: (EOGlobalID *)globalID
|
withGlobalID: (EOGlobalID *)globalID
|
||||||
editingContext: (EOEditingContext *)context;
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
|
- (void)refaultObject: (NSArray*)object
|
||||||
|
withSourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString*)relName
|
||||||
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
|
- (void) clearOriginalSnapshotForObject: (NSArray*)object
|
||||||
|
sourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
- (void)saveChangesInEditingContext: (EOEditingContext *)context;
|
- (void)saveChangesInEditingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
- (NSArray *)objectsWithFetchSpecification: (EOFetchSpecification *)fetchSpecification
|
- (NSArray *)objectsWithFetchSpecification: (EOFetchSpecification *)fetchSpecification
|
||||||
|
|
|
@ -752,6 +752,54 @@ May raise an exception if transaction has began or if you want pessimistic lock
|
||||||
//TODO: use isComplete
|
//TODO: use isComplete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void) _turnToArrayFault: (NSArray*)object
|
||||||
|
sourceGID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString*)relName
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
isComplete: (BOOL)isComplete
|
||||||
|
{
|
||||||
|
//OK
|
||||||
|
EOAccessArrayFaultHandler *handler=nil;
|
||||||
|
|
||||||
|
NSDebugMLLog(@"EODatabaseContext", @"object=%p", object);
|
||||||
|
NSDebugMLLog(@"EODatabaseContext", @"globalID=%@", globalID);
|
||||||
|
|
||||||
|
NSAssert(globalID, @"No globalID");
|
||||||
|
NSAssert1([globalID isKindOfClass: [EOKeyGlobalID class]],
|
||||||
|
@"globalID is not a EOKeyGlobalID but a %@",
|
||||||
|
[globalID class]);
|
||||||
|
|
||||||
|
if ([(EOKeyGlobalID*)globalID areKeysAllNulls])
|
||||||
|
NSWarnLog(@"All key of globalID %p (%@) are nulls",
|
||||||
|
globalID,
|
||||||
|
globalID);
|
||||||
|
|
||||||
|
handler = [EOAccessArrayFaultHandler
|
||||||
|
accessArrayFaultHandlerWithSourceGlobalID:(EOKeyGlobalID*)globalID
|
||||||
|
relationshipName: relName
|
||||||
|
databaseContext: self
|
||||||
|
editingContext: context];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NSDebugMLLog(@"EODatabaseContext", @"handler=%@", handler);
|
||||||
|
NSDebugMLLog(@"EODatabaseContext", @"object->class_pointer=%p",
|
||||||
|
GSObjCClass(object));
|
||||||
|
|
||||||
|
[EOFault makeObjectIntoFault: object
|
||||||
|
withHandler: handler];
|
||||||
|
|
||||||
|
|
||||||
|
NSDebugMLLog(@"EODatabaseContext", @"object->class_pointer=%p",
|
||||||
|
GSObjCClass(object));
|
||||||
|
|
||||||
|
[self _addToManyBatchForSourceGlobalID: (EOKeyGlobalID *)globalID
|
||||||
|
relationshipName: relName
|
||||||
|
fault: (EOFault*)object];
|
||||||
|
|
||||||
|
//TODO: use isComplete
|
||||||
|
}
|
||||||
/** Get a fault for 'globalID' **/
|
/** Get a fault for 'globalID' **/
|
||||||
//MG2014: OK
|
//MG2014: OK
|
||||||
- (id)faultForGlobalID: (EOGlobalID *)globalID
|
- (id)faultForGlobalID: (EOGlobalID *)globalID
|
||||||
|
@ -1173,6 +1221,25 @@ May raise an exception if transaction has began or if you want pessimistic lock
|
||||||
return objects;
|
return objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void) forgetSnapshotForSourceGlobalID: (EOGlobalID*)globalID
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
{
|
||||||
|
[_database forgetSnapshotForSourceGlobalID:globalID
|
||||||
|
relationshipName:name];
|
||||||
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void) clearOriginalSnapshotForObject: (NSArray*)object
|
||||||
|
sourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
{
|
||||||
|
[_database forgetSnapshotForSourceGlobalID:globalID
|
||||||
|
relationshipName:name];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)_registerSnapshot: (NSArray*)snapshot
|
- (void)_registerSnapshot: (NSArray*)snapshot
|
||||||
forSourceGlobalID: (EOGlobalID*)globalID
|
forSourceGlobalID: (EOGlobalID*)globalID
|
||||||
relationshipName: (NSString*)name
|
relationshipName: (NSString*)name
|
||||||
|
@ -1232,6 +1299,43 @@ May raise an exception if transaction has began or if you want pessimistic lock
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void)refaultObject: (NSArray*)object
|
||||||
|
withSourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString*)relName
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
{
|
||||||
|
[EOObserverCenter suppressObserverNotification];
|
||||||
|
|
||||||
|
NS_DURING
|
||||||
|
{
|
||||||
|
NSAssert1(!object || [object isKindOfClass:[NSMutableArray class]],@"Not a mutable array %p",object);
|
||||||
|
[(NSMutableArray*)object removeAllObjects];//OK
|
||||||
|
}
|
||||||
|
NS_HANDLER
|
||||||
|
{
|
||||||
|
[EOObserverCenter enableObserverNotification];
|
||||||
|
[localException raise];
|
||||||
|
}
|
||||||
|
NS_ENDHANDLER;
|
||||||
|
|
||||||
|
[EOObserverCenter enableObserverNotification];
|
||||||
|
|
||||||
|
if ([(EOKeyGlobalID *)globalID areKeysAllNulls])
|
||||||
|
NSWarnLog(@"All key of globalID %p (%@) are nulls",
|
||||||
|
globalID,
|
||||||
|
globalID);
|
||||||
|
|
||||||
|
[self _turnToArrayFault:object
|
||||||
|
sourceGID:globalID
|
||||||
|
relationshipName: relName
|
||||||
|
editingContext: context
|
||||||
|
isComplete: YES]; //Why YES ?
|
||||||
|
|
||||||
|
[self forgetSnapshotForSourceGlobalID:globalID
|
||||||
|
relationshipName:relName];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)saveChangesInEditingContext: (EOEditingContext *)context
|
- (void)saveChangesInEditingContext: (EOEditingContext *)context
|
||||||
{
|
{
|
||||||
//TODO: locks ?
|
//TODO: locks ?
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
#include "EOCustomObject.h"
|
#include "EOCustomObject.h"
|
||||||
#include "EOPrivate.h"
|
#include "EOPrivate.h"
|
||||||
|
#include "EONSAddOns.h"
|
||||||
|
|
||||||
|
|
||||||
@implementation EOCustomObject
|
@implementation EOCustomObject
|
||||||
|
@ -222,12 +223,12 @@
|
||||||
{
|
{
|
||||||
SEL validateSelector;
|
SEL validateSelector;
|
||||||
NSUInteger length = [key length];
|
NSUInteger length = [key length];
|
||||||
char buf[length + 10];
|
char buf[length + 10]; //validate + key + : + \0
|
||||||
|
|
||||||
strcpy(buf, "validate");
|
strcpy(buf, "validate");
|
||||||
|
|
||||||
[key getCString:&buf[8]
|
[key getCString:&buf[8]
|
||||||
maxLength:length
|
maxLength:length+1 //maxLength is total buffer size (See NSString.m comment)
|
||||||
encoding:NSASCIIStringEncoding];
|
encoding:NSASCIIStringEncoding];
|
||||||
|
|
||||||
buf[8] = toupper((int)buf[8]);
|
buf[8] = toupper((int)buf[8]);
|
||||||
|
@ -238,7 +239,7 @@
|
||||||
if (validateSelector && [self respondsToSelector: validateSelector])
|
if (validateSelector && [self respondsToSelector: validateSelector])
|
||||||
{
|
{
|
||||||
exception = [self performSelector: validateSelector
|
exception = [self performSelector: validateSelector
|
||||||
withObject: *valueP];
|
withPointer: valueP];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,7 +261,7 @@
|
||||||
NSDictionary * uInfo;
|
NSDictionary * uInfo;
|
||||||
|
|
||||||
uInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
uInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
(*value ? *value : (id)@"nil"), @"EOValidatedObjectUserInfoKey",
|
self, @"EOValidatedObjectUserInfoKey",
|
||||||
key, @"EOValidatedPropertyUserInfoKey",
|
key, @"EOValidatedPropertyUserInfoKey",
|
||||||
[ex reason], NSLocalizedDescriptionKey,
|
[ex reason], NSLocalizedDescriptionKey,
|
||||||
nil];
|
nil];
|
||||||
|
@ -444,7 +445,7 @@
|
||||||
strcpy(buf, "addTo");
|
strcpy(buf, "addTo");
|
||||||
|
|
||||||
[key getCString:&buf[5]
|
[key getCString:&buf[5]
|
||||||
maxLength:size
|
maxLength:size+1 //maxLength is total buffer size (See NSString.m comment)
|
||||||
encoding:NSASCIIStringEncoding];
|
encoding:NSASCIIStringEncoding];
|
||||||
|
|
||||||
buf[5] = toupper(buf[5]);
|
buf[5] = toupper(buf[5]);
|
||||||
|
@ -520,7 +521,7 @@
|
||||||
strcpy(buf, "removeFrom");
|
strcpy(buf, "removeFrom");
|
||||||
|
|
||||||
[key getCString:&buf[10]
|
[key getCString:&buf[10]
|
||||||
maxLength:size
|
maxLength:size+1 //maxLength is total buffer size (See NSString.m comment)
|
||||||
encoding:NSASCIIStringEncoding];
|
encoding:NSASCIIStringEncoding];
|
||||||
|
|
||||||
buf[10] = toupper(buf[10]);
|
buf[10] = toupper(buf[10]);
|
||||||
|
|
|
@ -238,6 +238,11 @@ modified state of the object.**/
|
||||||
withGlobalID: (EOGlobalID *)globalID
|
withGlobalID: (EOGlobalID *)globalID
|
||||||
editingContext: (EOEditingContext *)context;
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
|
- (void)refaultObject: (NSArray*)object
|
||||||
|
withSourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString*)relName
|
||||||
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
- (void)saveChangesInEditingContext: (EOEditingContext *)context;
|
- (void)saveChangesInEditingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
- (NSArray *)objectsWithFetchSpecification: (EOFetchSpecification *)fetchSpecification
|
- (NSArray *)objectsWithFetchSpecification: (EOFetchSpecification *)fetchSpecification
|
||||||
|
|
|
@ -3573,6 +3573,46 @@ modified state of the object.**/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void)refaultObject: (NSArray*)object
|
||||||
|
withSourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString *)relName
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
{
|
||||||
|
//Near OK
|
||||||
|
if (object && [EOFault isFault: object] == NO)
|
||||||
|
{
|
||||||
|
//call globalID isTemporary //ret NO
|
||||||
|
if (self == context)//??
|
||||||
|
{
|
||||||
|
//NO: in EODatabaseConetxt [object clearProperties];
|
||||||
|
|
||||||
|
if (NSMapGet(_objectsByGID, globalID) == nil
|
||||||
|
&& _sharedContext
|
||||||
|
&& [_sharedContext objectForGlobalID: globalID])
|
||||||
|
{
|
||||||
|
[NSException raise: NSInvalidArgumentException
|
||||||
|
format: @"Attempt to initialize object contained in EOSharedEditingContext"];
|
||||||
|
}
|
||||||
|
|
||||||
|
//OK
|
||||||
|
[_objectStore refaultObject: object
|
||||||
|
withSourceGlobalID: globalID
|
||||||
|
relationshipName: relName
|
||||||
|
editingContext: context];
|
||||||
|
//OK
|
||||||
|
[_objectStore clearOriginalSnapshotForObject: object
|
||||||
|
sourceGlobalID: globalID
|
||||||
|
relationshipName: relName
|
||||||
|
editingContext: context];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self notImplemented: _cmd];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)saveChangesInEditingContext: (EOEditingContext *)context
|
- (void)saveChangesInEditingContext: (EOEditingContext *)context
|
||||||
{
|
{
|
||||||
if (context != self)
|
if (context != self)
|
||||||
|
|
|
@ -119,6 +119,10 @@ returnsRemovedValues:(NSArray**)removedValues
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSObject (PerformSelect3)
|
@interface NSObject (PerformSelect3)
|
||||||
|
|
||||||
|
- (id) performSelector: (SEL)selector
|
||||||
|
withPointer: (void*) ptr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Causes the receiver to execute the method implementation corresponding
|
* Causes the receiver to execute the method implementation corresponding
|
||||||
* to selector and returns the result.<br />
|
* to selector and returns the result.<br />
|
||||||
|
|
|
@ -720,6 +720,27 @@ returnsRemovedValues:(NSArray**)removedValues
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation NSObject (PerformSelect3)
|
@implementation NSObject (PerformSelect3)
|
||||||
|
|
||||||
|
- (id) performSelector: (SEL)selector
|
||||||
|
withPointer: (void*) ptr
|
||||||
|
{
|
||||||
|
IMP msg;
|
||||||
|
|
||||||
|
if (selector == 0)
|
||||||
|
[NSException raise: NSInvalidArgumentException
|
||||||
|
format: @"%@ null selector given", NSStringFromSelector(_cmd)];
|
||||||
|
|
||||||
|
msg = class_getMethodImplementation([self class], selector);
|
||||||
|
if (!msg)
|
||||||
|
{
|
||||||
|
[NSException raise: NSGenericException
|
||||||
|
format: @"invalid selector passed to %s", sel_getName(_cmd)];
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (*msg)(self, selector, ptr);
|
||||||
|
}
|
||||||
|
|
||||||
//Ayers: Review (Do we really need this?)
|
//Ayers: Review (Do we really need this?)
|
||||||
/**
|
/**
|
||||||
* Causes the receiver to execute the method implementation corresponding
|
* Causes the receiver to execute the method implementation corresponding
|
||||||
|
|
|
@ -69,6 +69,16 @@
|
||||||
withGlobalID: (EOGlobalID *)globalID
|
withGlobalID: (EOGlobalID *)globalID
|
||||||
editingContext: (EOEditingContext *)context;
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
|
- (void)refaultObject: (NSArray*)object
|
||||||
|
withSourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString*)relName
|
||||||
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
|
- (void) clearOriginalSnapshotForObject: (NSArray*)object
|
||||||
|
sourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
editingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
- (void)saveChangesInEditingContext: (EOEditingContext *)context;
|
- (void)saveChangesInEditingContext: (EOEditingContext *)context;
|
||||||
|
|
||||||
- (NSArray *)objectsWithFetchSpecification: (EOFetchSpecification *)fetchSpecification
|
- (NSArray *)objectsWithFetchSpecification: (EOFetchSpecification *)fetchSpecification
|
||||||
|
|
|
@ -103,6 +103,24 @@ NSString *EOUpdatedKey = @"updated";
|
||||||
[self subclassResponsibility: _cmd];
|
[self subclassResponsibility: _cmd];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void)refaultObject: (NSArray*)object
|
||||||
|
withSourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString*)relName
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
{
|
||||||
|
[self subclassResponsibility: _cmd];
|
||||||
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void) clearOriginalSnapshotForObject: (NSArray*)object
|
||||||
|
sourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
{
|
||||||
|
[self subclassResponsibility: _cmd];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)saveChangesInEditingContext: (EOEditingContext *)context
|
- (void)saveChangesInEditingContext: (EOEditingContext *)context
|
||||||
{
|
{
|
||||||
[self subclassResponsibility: _cmd];
|
[self subclassResponsibility: _cmd];
|
||||||
|
|
|
@ -342,6 +342,32 @@ NSString *EOCooperatingObjectStoreNeeded = @"EOCooperatingObjectStoreNeeded";
|
||||||
editingContext: context];
|
editingContext: context];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void)refaultObject: (NSArray*)object
|
||||||
|
withSourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString*)relName
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
{
|
||||||
|
[[self objectStoreForGlobalID: globalID]
|
||||||
|
refaultObject: object
|
||||||
|
withSourceGlobalID: globalID
|
||||||
|
relationshipName: relName
|
||||||
|
editingContext: context];
|
||||||
|
}
|
||||||
|
|
||||||
|
//GDL2 addition: enable refaulting object to-many property
|
||||||
|
- (void) clearOriginalSnapshotForObject: (NSArray*)object
|
||||||
|
sourceGlobalID: (EOGlobalID *)globalID
|
||||||
|
relationshipName: (NSString *)name
|
||||||
|
editingContext: (EOEditingContext *)context
|
||||||
|
{
|
||||||
|
return [[self objectStoreForGlobalID: globalID]
|
||||||
|
clearOriginalSnapshotForObject: object
|
||||||
|
sourceGlobalID: globalID
|
||||||
|
relationshipName: name
|
||||||
|
editingContext: context];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)initializeObject: (id)object
|
- (void)initializeObject: (id)object
|
||||||
withGlobalID: (EOGlobalID *)globalID
|
withGlobalID: (EOGlobalID *)globalID
|
||||||
editingContext: (EOEditingContext *)context
|
editingContext: (EOEditingContext *)context
|
||||||
|
|
Loading…
Reference in a new issue