From 97bdca08395d32ba569c23be18f7a2e50efbd416 Mon Sep 17 00:00:00 2001 From: David Ayers Date: Mon, 16 Mar 2009 08:26:00 +0000 Subject: [PATCH] * EOAccess/EODatabase.m (setUpdateStrategy:): Count the snapshots to determine if we actually already have fetched them. Reported by: Thierry Delhaise git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@28085 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 ++++++- EOAccess/EODatabaseContext.m | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c067a37..22f70b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-03-16 David Ayers + + * EOAccess/EODatabase.m (setUpdateStrategy:): Count the snapshots + to determine if we actually already have fetched them. + Reported by: Thierry Delhaise + 2009-03-03 Matt Rice * DBModeler/ModelerAttributeEditor.m @@ -14,7 +20,6 @@ (-delete:): Revert the selection back to the viewed object, and activate the new selection. - 2009-03-02 Matt Rice * DBModeler/ModelerAttributeEditor.m (dealloc): Remove observers and diff --git a/EOAccess/EODatabaseContext.m b/EOAccess/EODatabaseContext.m index 6cabaf3..de13062 100644 --- a/EOAccess/EODatabaseContext.m +++ b/EOAccess/EODatabaseContext.m @@ -575,7 +575,7 @@ May raise an exception if transaction has began or if you want pessimistic lock //Can't set pessimistic locking where there's already snapshosts ! if (strategy == EOUpdateWithPessimisticLocking - && [_database snapshots]) + && [[_database snapshots] count]) [NSException raise: NSInvalidArgumentException format: @"%@ -- %@ 0x%x: can't set EOUpdateWithPessimisticLocking when receive's EODatabase already has snapshots", NSStringFromSelector(_cmd),