bug-gnustep
[Top][All Lists]
Advanced

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

Fix GDL2, EODatabaseContext (-objectsWithFetchSpecification:editingConte


From: Georg Fleischmann
Subject: Fix GDL2, EODatabaseContext (-objectsWithFetchSpecification:editingContext:)
Date: Sun, 5 Sep 2010 16:23:19 +0800

Hi,

I am working on getting my applications running with the latest SVN version of 
GDL2. It seems that GDL2 is always locking everything now (that was different 
in 0.12.0).
The first thing that happens in [EODatabaseContext 
-objectsWithFetchSpecification:editingContext:] when fetching an object is 
locking:

  if (_flags.beganTransaction == NO)
  {
    [_adaptorContext beginTransaction];
    
    _flags.beganTransaction = YES;
  }

To fix this, I added a check for pessimistic locking (see attached patch).
That seems to fix my problems.


* EOAccess/EODatabaseContext ([EODatabaseContext 
-objectsWithFetchSpecification:editingContext:]):
call beginTransaction only for pessimistic locking


Best wishes,
Georg Fleischmann




*** EOAccess/EODatabaseContext.m.old    2010-09-04 13:56:33.000000000 +0800
--- EOAccess/EODatabaseContext.m        2010-09-05 15:01:56.000000000 +0800
***************
*** 1544,1550 ****
  
        channel = [self _obtainOpenChannel];
    
!   if (_flags.beganTransaction == NO)
    {
      [_adaptorContext beginTransaction];
      
--- 1544,1551 ----
  
        channel = [self _obtainOpenChannel];
    
!   if (_flags.beganTransaction == NO
!       && _updateStrategy == EOUpdateWithPessimisticLocking)
    {
      [_adaptorContext beginTransaction];
      




reply via email to

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