Author: shawkins
Date: 2010-06-21 16:26:14 -0400 (Mon, 21 Jun 2010)
New Revision: 2269
Added:
branches/7.0.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
branches/7.0.x/metadata/src/test/resources/ZZZ.vdb
Modified:
branches/7.0.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
Log:
TEIID-1129 fix for multiple model index files.
Modified:
branches/7.0.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
---
branches/7.0.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-06-21
20:21:08 UTC (rev 2268)
+++
branches/7.0.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-06-21
20:26:14 UTC (rev 2269)
@@ -538,7 +538,7 @@
// Query based on fully qualified name
else {
String prefixString = getPrefixPattern(recordType,entityName);
- results = queryIndex(recordType, prefixString.toCharArray(), true, true, true);
+ results = queryIndex(recordType, prefixString.toCharArray(), true, true, entityName !=
null);
}
return results;
Added:
branches/7.0.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
===================================================================
---
branches/7.0.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
(rev 0)
+++
branches/7.0.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java 2010-06-21
20:26:14 UTC (rev 2269)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.metadata.index;
+
+import static org.junit.Assert.*;
+
+import java.util.Collection;
+
+import org.junit.Test;
+import org.teiid.core.util.UnitTestUtil;
+import org.teiid.metadata.TransformationMetadata;
+
+@SuppressWarnings("nls")
+public class TestMultipleModelIndexes {
+
+ @Test public void testMultiple() throws Exception {
+ TransformationMetadata tm =
VDBMetadataFactory.getVDBMetadata(UnitTestUtil.getTestDataPath() + "/ZZZ.vdb");
+ Collection<String> names = tm.getGroupsForPartialName("PRODUCTDATA");
+ assertEquals(1, names.size());
+ names = tm.getGroupsForPartialName("PARTS");
+ assertEquals(1, names.size());
+ }
+
+}
Property changes on:
branches/7.0.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/7.0.x/metadata/src/test/resources/ZZZ.vdb
===================================================================
(Binary files differ)
Property changes on: branches/7.0.x/metadata/src/test/resources/ZZZ.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Show replies by date