]> err.no Git - sope/commitdiff
improvs
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Oct 2005 21:27:47 +0000 (21:27 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Oct 2005 21:27:47 +0000 (21:27 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1149 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/EOCoreData/ChangeLog
sope-core/EOCoreData/EOCompoundQualifiers.m
sope-core/EOCoreData/EOFetchSpecification+CoreData.m
sope-core/EOCoreData/Version

index d5095565e0e6614a76b010f85598b641b8a257cd..292dd9e4fbd944da4e9af658442bc8536a492b19 100644 (file)
@@ -1,5 +1,13 @@
 2005-10-03  Helge Hess  <helge.hess@opengroupware.org>
 
+       * v4.5.11
+
+       * EOFetchSpecification+CoreData.m: only transfer limit to
+         NSFetchRequest if its != 0
+
+       * EOCompoundQualifiers.m: added support for qualifier=>predicate
+         conversion
+
        * improved qualifier=>predicate conversion support (v4.5.10)
 
 2005-08-23  Helge Hess  <helge.hess@opengroupware.org>
index ffb0791802a7a231613bb4b0ac9c0bc3841e8b8d..5ba98603531a975be68fca162e5e6e15af6e2d04 100644 (file)
 }
 
 - (NSPredicate *)asPredicate {
-  NSLog(@"TODO(%s): implement me for class %@!", __PRETTY_FUNCTION__,
-       NSStringFromClass([self class]));
-  return nil;
+  NSArray *tmp;
+  
+  tmp = [self subqualifiers];
+  tmp = [tmp valueForKey:@"asPredicate"];
+  return [NSCompoundPredicate andPredicateWithSubpredicates:tmp];
 }
 
 @end /* EOAndQualifier(CoreData) */
 
+
 @implementation EOOrQualifier(CoreData)
 
 - (NSCompoundPredicateType)compoundPredicateType {
 }
 
 - (NSPredicate *)asPredicate {
-  NSLog(@"TODO(%s): implement me for class %@!", __PRETTY_FUNCTION__,
-       NSStringFromClass([self class]));
-  return nil;
+  NSArray *tmp;
+  
+  tmp = [self subqualifiers];
+  tmp = [tmp valueForKey:@"asPredicate"];
+  return [NSCompoundPredicate orPredicateWithSubpredicates:tmp];
 }
 
 @end /* EOOrQualifier(CoreData) */
 
+
 @implementation EONotQualifier(CoreData)
 
 - (NSCompoundPredicateType)compoundPredicateType {
index 9620487ad892a7b5ee6094a14c8437fbc3cbb948..5ec4631a012cf63bb3d38e9780f4a0416be2f58a 100644 (file)
 
 - (NSFetchRequest *)fetchRequestWithEntity:(NSEntityDescription *)_entity {
   NSFetchRequest *fr;
+  unsigned int limit;
   
   fr = [[[NSFetchRequest alloc] init] autorelease];
   [fr setEntity:_entity];
-  [fr setFetchLimit:[self fetchLimit]];
+  
+  if ((limit = [self fetchLimit]) > 0)
+    [fr setFetchLimit:limit];
+  
   [fr setPredicate:[[self qualifier] asPredicate]];
   [fr setSortDescriptors:[self sortOrderingsAsSortDescriptors]];
   return fr;
index 5e8237938bf25d5166612c59f78bed6ed7da850e..d4260269633d8348fd2a8fb191f1d3f83666f26a 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=10
+SUBMINOR_VERSION:=11