Tweaks for ALF-4529: Database connection problems when upgrading large sample 2.1.x data set

- Handle invalid child association QNames
 - Optimization on an array copy


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23238 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-10-22 20:21:10 +00:00
parent f2f318b89b
commit f48288b5a5
3 changed files with 16 additions and 0 deletions

View File

@@ -415,6 +415,12 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
try
{
List<Map<String, Object>> rows = template.queryForList(SELECT_CHILD_ASSOCS_FOR_CRCS, entity, 0, queryMaxResults);
if (results.size() == 0 && rows.size() >= maxResults)
{
// We have all we need
results = rows;
break;
}
// Add these rows to the result
results.addAll(rows);
// Calculate new maxResults