bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix GDL2, EODatabaseContext (_fireArrayFault:)


From: Georg Fleischmann
Subject: Fix GDL2, EODatabaseContext (_fireArrayFault:)
Date: Sat, 4 Sep 2010 15:06:25 +0800

Hi,

attached is another little patch for EODatabaseContext (_fireArrayFault:) to 
prevent an exception, when the fault object turns into a real object before it 
is passed to -clearFault:.

In my case 'object' is a fault before the following call, but turns into a real 
object within:
      objects = [context objectsForSourceGlobalID: gid
                         relationshipName: relationshipName
                         editingContext: context];

To prevent an exception in this case I test, if object is still a fault before 
calling -clearFault:.


* EOAccess/EODatabaseContext ([EODatabaseContext -_fireArrayFault:]):
test if object is still a fault before calling -clearFault:


Best wishes,
Georg Fleischmann



*** EOAccess/EODatabaseContext.m.old    2010-09-02 16:01:45.000000000 +0800
--- EOAccess/EODatabaseContext.m        2010-09-04 13:56:33.000000000 +0800
***************
*** 4884,4890 ****
                         relationshipName: relationshipName
                         editingContext: context];
  
!       [EOFault clearFault: object]; //??
        /* in clearFault 
           [handler faultWillFire:object];
           targetClass=[handler targetClass];
--- 4884,4891 ----
                         relationshipName: relationshipName
                         editingContext: context];
  
!       if (_isFault(object))
!         [EOFault clearFault: object]; //??
        /* in clearFault 
           [handler faultWillFire:object];
           targetClass=[handler targetClass];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]