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];
      


_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to