From 1e318bafa861fad8cc39d1d94bfe27f8d1d416e2 Mon Sep 17 00:00:00 2001 From: Johann Werner Date: Tue, 27 Nov 2012 15:54:35 +0100 Subject: [PATCH] fix rowCount if using batching display group with object array (issue #332) --- .../er/extensions/batching/ERXBatchingDisplayGroup.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Frameworks/Core/ERExtensions/Sources/er/extensions/batching/ERXBatchingDisplayGroup.java b/Frameworks/Core/ERExtensions/Sources/er/extensions/batching/ERXBatchingDisplayGroup.java index c003d26bc61..a110cfb03d1 100644 --- a/Frameworks/Core/ERExtensions/Sources/er/extensions/batching/ERXBatchingDisplayGroup.java +++ b/Frameworks/Core/ERExtensions/Sources/er/extensions/batching/ERXBatchingDisplayGroup.java @@ -345,8 +345,10 @@ public int rowCount() { if (rowCount == -1) { if (isBatching()) { rowCount = ERXEOAccessUtilities.rowCountForFetchSpecification(dataSource().editingContext(), fetchSpecification()); - } else { + } else if (dataSource() != null) { rowCount = dataSource().fetchObjects().count(); + } else if (allObjects() != null) { + rowCount = allObjects().count(); } if (shouldRememberRowCount()) { _rowCount = rowCount;