The attached patch has three changes in response to coverage data:
1) Some dead internal code has been removed 2) Test cases have been updated to test some corner cases that weren't being covered 3) A fix to operation sorting for deletes (this was not being tested previously.) Brent
Index: src/test/java/org/apache/tuscany/das/rdb/test/OperationOrderingTests.java =================================================================== --- src/test/java/org/apache/tuscany/das/rdb/test/OperationOrderingTests.java (revision 425121) +++ src/test/java/org/apache/tuscany/das/rdb/test/OperationOrderingTests.java (working copy) @@ -16,6 +16,9 @@ */ package org.apache.tuscany.das.rdb.test; +import java.util.ArrayList; +import java.util.Iterator; + import org.apache.tuscany.das.rdb.Command; import org.apache.tuscany.das.rdb.DAS; import org.apache.tuscany.das.rdb.test.data.CityData; @@ -75,4 +78,44 @@ assertEquals(numberOfStates + 1, root.getList("STATES").size()); } + public void testDeletes() throws Exception { + DAS das = DAS.FACTORY.createDAS(getConfig("cityStates.xml"), getConnection()); + Command select = das + .createCommand( + "Select * from STATES inner join CITIES on STATES.ID = CITIES.STATE_ID"); + DataObject root = select.executeQuery(); + + + DataObject firstState = root.getDataObject("STATES[1]"); + String stateName = firstState.getString("NAME"); + + ArrayList cityNames = new ArrayList(); + Iterator i = firstState.getList("cities").iterator(); + while ( i.hasNext()) { + DataObject firstCity = (DataObject) i.next(); + cityNames.add(firstCity.getString("NAME")); + firstCity.delete(); + } + firstState.delete(); + + + + + das.applyChanges(root); + + root = select.executeQuery(); + + Iterator iter = root.getList("STATES").iterator(); + while ( iter.hasNext()) { + DataObject state = (DataObject)iter.next(); + assertFalse(state.getString("NAME").equals(stateName)); + } + + iter = root.getList("CITIES").iterator(); + while ( iter.hasNext()) { + DataObject city = (DataObject)iter.next(); + assertFalse(cityNames.contains(city.getString("NAME"))); + } + + } } Index: src/test/java/org/apache/tuscany/das/rdb/test/ExceptionTests.java =================================================================== --- src/test/java/org/apache/tuscany/das/rdb/test/ExceptionTests.java (revision 425121) +++ src/test/java/org/apache/tuscany/das/rdb/test/ExceptionTests.java (working copy) @@ -16,6 +16,7 @@ */ package org.apache.tuscany.das.rdb.test; +import java.io.FileInputStream; import java.sql.Connection; import org.apache.tuscany.das.rdb.Command; @@ -26,6 +27,7 @@ import org.apache.tuscany.das.rdb.test.data.OrderData; import org.apache.tuscany.das.rdb.test.data.OrderDetailsData; import org.apache.tuscany.das.rdb.test.framework.DasTest; +import org.apache.tuscany.das.rdb.util.ConfigUtil; import org.apache.tuscany.sdo.util.SDOUtil; public class ExceptionTests extends DasTest { @@ -133,5 +135,6 @@ } + } Index: src/test/java/org/apache/tuscany/das/rdb/test/CrudWithChangeHistory.java =================================================================== --- src/test/java/org/apache/tuscany/das/rdb/test/CrudWithChangeHistory.java (revision 425121) +++ src/test/java/org/apache/tuscany/das/rdb/test/CrudWithChangeHistory.java (working copy) @@ -48,6 +48,41 @@ super.tearDown(); } + public void testDeleteAndCreate() throws Exception { + DAS das = DAS.FACTORY.createDAS( + getConfig("basicCustomerMappingWithCUD2.xml"), getConnection()); + // Read customer 1 + Command select = das + .createCommand("Select * from CUSTOMER"); + DataObject root = select.executeQuery(); + + DataObject customer = (DataObject) root.get("CUSTOMER[1]"); + + int customerId = customer.getInt("ID"); + // Modify customer + customer.delete(); + + DataObject newCustomer = root.createDataObject("CUSTOMER"); + newCustomer.setInt("ID", 9999); + newCustomer.setString("LASTNAME", "Jones"); + + // Build apply changes command + das.applyChanges(root); + + // Verify changes + root = select.executeQuery(); + boolean found = false; + Iterator i = root.getList("CUSTOMER").iterator(); + while ( i.hasNext()) { + customer = (DataObject)i.next(); + assertFalse(customerId == customer.getInt("ID")); + if ( customer.getInt("ID") == 9999 ) + found = true; + } + + assertTrue(found); + + } /** * Read and modify a customer. Provide needed Create/Update/Delete * statements programatically Index: src/test/java/org/apache/tuscany/das/rdb/test/OCCTests.java =================================================================== --- src/test/java/org/apache/tuscany/das/rdb/test/OCCTests.java (revision 425121) +++ src/test/java/org/apache/tuscany/das/rdb/test/OCCTests.java (working copy) @@ -17,7 +17,10 @@ package org.apache.tuscany.das.rdb.test; import org.apache.tuscany.das.rdb.Command; +import org.apache.tuscany.das.rdb.ConfigHelper; import org.apache.tuscany.das.rdb.DAS; +import org.apache.tuscany.das.rdb.config.Config; +import org.apache.tuscany.das.rdb.config.ConfigFactory; import org.apache.tuscany.das.rdb.test.data.BookData; import org.apache.tuscany.das.rdb.test.framework.DasTest; @@ -99,4 +102,29 @@ throw ex; } } + + public void testProvidedConfig() throws Exception { + // Create config programmatically + Config config = ConfigFactory.INSTANCE.createConfig(); + ConfigHelper helper = new ConfigHelper(config); + helper.addPrimaryKey("BOOK.BOOK_ID"); + DAS das = DAS.FACTORY.createDAS(helper.getConfig(), getConnection()); + + // Read a book instance + Command select = das + .createCommand("SELECT * FROM BOOK WHERE BOOK_ID = 1"); + DataObject root = select.executeQuery(); + DataObject book = root.getDataObject("BOOK[1]"); + // Change a field to mark the instance 'dirty' + book.setInt("QUANTITY", 2); + + // Flush the change + + das.applyChanges(root); + + // Verify + root = select.executeQuery(); + book = root.getDataObject("BOOK[1]"); + assertEquals(2, book.getInt("QUANTITY")); + } } Index: src/test/java/org/apache/tuscany/das/rdb/test/ConverterTests.java =================================================================== --- src/test/java/org/apache/tuscany/das/rdb/test/ConverterTests.java (revision 425121) +++ src/test/java/org/apache/tuscany/das/rdb/test/ConverterTests.java (working copy) @@ -23,8 +23,11 @@ import org.apache.tuscany.das.rdb.Command; import org.apache.tuscany.das.rdb.DAS; +import org.apache.tuscany.das.rdb.test.customer.Customer; +import org.apache.tuscany.das.rdb.test.customer.CustomerFactory; import org.apache.tuscany.das.rdb.test.data.CustomerData; import org.apache.tuscany.das.rdb.test.framework.DasTest; +import org.apache.tuscany.sdo.util.SDOUtil; import commonj.sdo.DataObject; @@ -99,4 +102,59 @@ } + public void testInvalidConverter1() throws Exception { + + DAS das = DAS.FACTORY.createDAS(getConfig("InvalidConverter.xml"), getConnection()); + + // Build the select command to read a specific customer and related + // orders + Command select = das + .createCommand( + "SELECT * FROM CUSTOMER LEFT JOIN ANORDER ON CUSTOMER.ID = ANORDER.CUSTOMER_ID where CUSTOMER.ID = ?"); + + // Parameterize the command + select.setParameter(1, new Integer(1)); + + // Get the graph + try { + select.executeQuery(); + } catch (Exception ex) { + assertEquals("java.lang.ClassNotFoundException: not.a.valid.class", ex.getMessage()); + } + + + } + + public void testInvalidConverter2() throws Exception { + + SDOUtil.registerStaticTypes(CustomerFactory.class); + DAS das = DAS.FACTORY.createDAS(getConfig("InvalidConverter.xml"), getConnection()); + + // Build the select command to read a specific customer and related + // orders + Command select = das + .createCommand( + "SELECT * FROM ANORDER"); + + // Get the graph + + DataObject root = select.executeQuery(); + DataObject order = root.getDataObject("AnOrder[1]"); + + Customer customer = (Customer) root.createDataObject("Customer"); + customer.setID(700); + customer.setLastName("Daniel"); + customer.setAddress("an address"); + + customer.getOrders().add(order); + + try { + das.applyChanges(root); + } catch (Exception ex) { + assertEquals("java.lang.ClassNotFoundException: not.a.valid.class", ex.getMessage()); + } + + + } + } Index: src/test/java/org/apache/tuscany/das/rdb/test/GeneratedId.java =================================================================== --- src/test/java/org/apache/tuscany/das/rdb/test/GeneratedId.java (revision 425121) +++ src/test/java/org/apache/tuscany/das/rdb/test/GeneratedId.java (working copy) @@ -22,6 +22,8 @@ * */ +import java.util.Iterator; + import org.apache.tuscany.das.rdb.Command; import org.apache.tuscany.das.rdb.DAS; import org.apache.tuscany.das.rdb.test.data.CompanyData; @@ -100,6 +102,31 @@ } + // Test insert into row with generated ID and generated insert + public void testInsert4() throws Exception { + + DAS das = DAS.FACTORY.createDAS(getConfig("CompanyConfig.xml"),getConnection()); + Command select = das.getCommand("all companies"); + DataObject root = select.executeQuery(); + + DataObject company = root.createDataObject("COMPANY"); + company.setString("NAME", "Phil's Tires"); + // This shouldn't do anything + company.setInt("ID", 999); + + das.applyChanges(root); + + // Verify insert + root = select.executeQuery(); + + assertEquals(4, root.getList("COMPANY").size()); + Iterator i = root.getList("COMPANY").iterator(); + while ( i.hasNext()) { + DataObject comp = (DataObject)i.next(); + assertFalse( comp.getInt("ID") == 999); + } + + } // Test ability to propogate generated values back to owning data objects public void testPropagateIds() throws Exception { Index: src/test/java/org/apache/tuscany/das/rdb/test/CompoundKeyTests.java =================================================================== --- src/test/java/org/apache/tuscany/das/rdb/test/CompoundKeyTests.java (revision 425121) +++ src/test/java/org/apache/tuscany/das/rdb/test/CompoundKeyTests.java (working copy) @@ -92,4 +92,21 @@ assertEquals(2, firstOrder.getList("ORDERDETAILS").size()); } + + public void testReadAndDelete() throws Exception { + DAS das = DAS.FACTORY.createDAS(getConfig("OrdersOrderDetailsConfig.xml"), getConnection()); + Command getOrderDetails = das + .createCommand("Select * from ORDERDETAILS where ORDERID = ? AND PRODUCTID = ?"); + + + getOrderDetails.setParameter(1, new Integer(1)); + getOrderDetails.setParameter(2, new Integer(1)); + + DataObject root = getOrderDetails.executeQuery(); + + DataObject orderDetail = (DataObject) root.get("ORDERDETAILS[1]"); + orderDetail.delete(); + das.applyChanges(root); + + } } Index: src/test/resources/BooksConfig.xml =================================================================== --- src/test/resources/BooksConfig.xml (revision 425121) +++ src/test/resources/BooksConfig.xml (working copy) @@ -21,7 +21,7 @@ <Table tableName="BOOK"> <Column columnName="BOOK_ID" primaryKey="true"/> - <Column columnName="OCC" collision="true"/> + <Column columnName="OCC" collision="true" propertyName="anOccColumn"/> </Table> </Config> Index: src/test/resources/InvalidConverter.xml =================================================================== --- /dev/null (revision 0) +++ src/test/resources/InvalidConverter.xml (revision 0) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> +<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +dataObjectModel="http:///org.apache.tuscany.das.rdb.test/customer.xsd"> + + <Table tableName="CUSTOMER" typeName="Customer"> + <Column columnName="ID" primaryKey="true" converterClassName="not.a.valid.class"/> + </Table> + + <Table tableName="ANORDER" typeName="AnOrder"> + <Column columnName="CUSTOMER_ID"/> + <Column columnName="ID" primaryKey="true"/> + </Table> + + <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true"> + <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/> + </Relationship> + +</Config> + Index: src/main/java/org/apache/tuscany/das/rdb/impl/ApplyChangesCommandImpl.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/ApplyChangesCommandImpl.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/ApplyChangesCommandImpl.java (working copy) @@ -34,13 +34,6 @@ private static final boolean debug = false; private ChangeSummarizer summarizer = new ChangeSummarizer(); - - public ApplyChangesCommandImpl() { - } - - public ApplyChangesCommandImpl(Config config){ - this.configWrapper = new MappingWrapper(config); - } public ApplyChangesCommandImpl(Config config, Connection connection){ this.configWrapper = new MappingWrapper(config); @@ -53,18 +46,7 @@ summarizer.setConnection(connection); } - public void addCreateCommand(Type type, Command cmd) { - summarizer.addCreateCommand(type, cmd); - } - public void addUpdateCommand(Type type, Command cmd) { - summarizer.addUpdateCommand(type, cmd); - } - - public void addDeleteCommand(Type type, Command cmd) { - summarizer.addDeleteCommand(type, cmd); - } - public void execute(DataObject root) { DebugUtil.debugln(getClass(), debug, "Executing ApplyChangesCmd"); Index: src/main/java/org/apache/tuscany/das/rdb/impl/FactoryRegistry.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/FactoryRegistry.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/FactoryRegistry.java (working copy) @@ -39,7 +39,7 @@ ChangeFactory factory = (ChangeFactory)registry.get(type); if ( factory == null ) { DebugUtil.debugln(getClass(), debug, "Creating new ChangeFactory for type " + type.getName()); - factory = new ChangeFactory(type, mapping, connection); + factory = new ChangeFactory(mapping, connection); registry.put(type, factory); } return factory; Index: src/main/java/org/apache/tuscany/das/rdb/impl/ParameterImpl.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/ParameterImpl.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/ParameterImpl.java (working copy) @@ -50,10 +50,6 @@ super(); } - public ParameterImpl(String name) { - this.name = name; - } - public ParameterImpl(int index) { this.index = index; } @@ -113,14 +109,6 @@ return this.converter; } - - public String toString() { - StringBuffer buffer = new StringBuffer(); - buffer.append("Index: " + getIndex()); - buffer.append("\nName: " + getName()); - buffer.append("\nValue: " + getValue()); - return buffer.toString(); - } } Index: src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/InsertCommandImpl.java (working copy) @@ -35,9 +35,6 @@ addParameters(create.getParameters()); } - protected boolean isInsert() { - return true; - } public int getGeneratedKey() { @@ -60,16 +57,5 @@ } - public String toString() { - String superString = super.toString(); - StringBuffer buffer = new StringBuffer(superString); - - buffer.append("\nGenerating key: " + hasGeneratedKey); - if (hasGeneratedKey) - buffer.append("\nGenerated key: " + generatedKey); - - return buffer.toString(); - } - } Index: src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/WriteCommandImpl.java (working copy) @@ -17,8 +17,6 @@ package org.apache.tuscany.das.rdb.impl; import java.sql.SQLException; -import java.util.Collection; -import java.util.Iterator; import java.util.StringTokenizer; import org.apache.tuscany.das.rdb.config.Config; @@ -89,13 +87,7 @@ addParameter(p); } } - public void addParameters(Collection updateParameters) { - Iterator i = updateParameters.iterator(); - while ( i.hasNext()) { - ParameterImpl p = (ParameterImpl) i.next(); - addParameter(p); - } - } + } Index: src/main/java/org/apache/tuscany/das/rdb/impl/ChangeFactory.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/ChangeFactory.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/ChangeFactory.java (working copy) @@ -28,11 +28,8 @@ import org.apache.tuscany.das.rdb.util.DebugUtil; import commonj.sdo.DataObject; -import commonj.sdo.Type; public class ChangeFactory { - - private final Type type; private InsertCommandImpl createCommand; @@ -46,15 +43,10 @@ private final ConnectionImpl connection; - public ChangeFactory(Type type, MappingWrapper mapping, ConnectionImpl connection) { - this.type = type; + public ChangeFactory(MappingWrapper mapping, ConnectionImpl connection) { this.mapping = mapping; this.connection = connection; } - - public Type getType() { - return this.type; - } public void setCreateCommand(InsertCommandImpl cmd) { createCommand = cmd; @@ -138,6 +130,7 @@ deleteCommand = new DeleteCommandImpl(delete); } deleteCommand.setConnection(connection); + deleteCommand.configWrapper = mapping; } return deleteCommand; } Index: src/main/java/org/apache/tuscany/das/rdb/impl/QueryString.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/QueryString.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/QueryString.java (working copy) @@ -1,86 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.tuscany.das.rdb.impl; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.tuscany.das.rdb.util.DebugUtil; - - -public class QueryString { - - private final String unmodifiedQueryString; - private final String preparedString; - private HashMap parameters = new HashMap(); - private static final boolean debug = false; - - public QueryString(String originalString) { - this.unmodifiedQueryString = originalString; - this.preparedString = replaceNamesAndSetIndexes(originalString); - } - - public String getPreparedString() { - return this.preparedString; - } - - public String getUnmodifiedString() { - return this.unmodifiedQueryString; - } - - public int getParameterIndex(String name) { - DebugUtil.debugln(getClass(), debug, "Looking for parameter index for: " + name); - return ((Integer)parameters.get(name)).intValue(); - } - - private String replaceNamesAndSetIndexes(String query) { - DebugUtil.debugln(getClass(), debug, "Parameterizing query: " + query); - Pattern p = Pattern.compile(":[\\S&&[^,()]]*"); - Matcher m = p.matcher(query); - - int index = 1; - while (m.find()) { - parameters.put(m.group().substring(1), new Integer(index)); - query = m.replaceFirst("?"); - m = p.matcher(query); - index++; - } - - DebugUtil.debugln(getClass(), debug, "Parameterized query: " + query); - return query; - } - - - public String toString() { - StringBuffer buffer = new StringBuffer(); - buffer.append("\nOriginal SQL: "); - buffer.append(unmodifiedQueryString); - buffer.append("\nPrepared SQL: "); - buffer.append(preparedString); - buffer.append("\nParameters: "); - Iterator i = parameters.keySet().iterator(); - while ( i.hasNext() ) { - String key = (String)i.next(); - buffer.append("\n"); - buffer.append(key); - } - return buffer.toString(); - } - -} Index: src/main/java/org/apache/tuscany/das/rdb/impl/DeleteList.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/impl/DeleteList.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/impl/DeleteList.java (working copy) @@ -21,6 +21,8 @@ import java.util.HashMap; import java.util.Iterator; +import org.apache.tuscany.das.rdb.util.DebugUtil; + /** * DeleteList will sort delete operations so that child objects are deleted * before their parents @@ -40,7 +42,7 @@ } public void add(ChangeOperation op) { - if (( order == null ) || ( op.getTableName() == null ) ) { + if (( order.size() == 0 ) || ( op.getTableName() == null ) ) { deleteOperations.add(op); } else { String name = op.getTableName(); @@ -54,11 +56,12 @@ } public Collection getSortedList() { - if (( order != null ) && ( opsByTableName.keySet().size() > 0) ) { + if (( order.size() > 0 ) && ( opsByTableName.keySet().size() > 0) ) { Iterator i = this.order.iterator(); while (i.hasNext()) { String name = (String) i.next(); - deleteOperations.addAll((Collection) opsByTableName.get(name)); + if ( opsByTableName.get(name) != null) + deleteOperations.addAll((Collection) opsByTableName.get(name)); } } Index: src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/ConfigHelper.java (working copy) @@ -44,9 +44,6 @@ configWrapper = new MappingWrapper(config); } - public Config newInstance() { - return factory.createConfig(); - } public void addPrimaryKey(String columnName) { configWrapper.addPrimaryKey(columnName); Index: src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/config/wrapper/MappingWrapper.java (working copy) @@ -190,19 +190,6 @@ return propertyName; } - public void addCollisionColumn(String columnName) { - - if (config == null) - config = factory.createConfig(); - - QualifiedColumn occColumn = new QualifiedColumn(columnName); - Table t = findOrCreateTable(occColumn.getTableName()); - Column c = findOrCreateColumn(t, occColumn.getColumnName()); - c.setCollision(true); - - config.getTable().add(t); - } - public void addTable(String tableName, String typeName) { Table table = getTable(tableName); if (table != null) Index: src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java =================================================================== --- src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java (revision 425121) +++ src/main/java/org/apache/tuscany/das/rdb/generator/impl/InsertGenerator.java (working copy) @@ -111,7 +111,7 @@ } else { if ( obj.isSet(p) ) { Relationship relationship = config.getRelationshipByReference(p); - if ( p.getOpposite().isMany() || (hasState(config, relationship, obj))) { + if ((p.getOpposite() != null && p.getOpposite().isMany()) || (hasState(config, relationship, obj))) { RelationshipWrapper r = new RelationshipWrapper( relationship); Iterator keys = r.getForeignKeys().iterator(); Index: pom.xml =================================================================== --- pom.xml (revision 425121) +++ pom.xml (working copy) @@ -63,8 +63,6 @@ <id>config</id> <configuration> <schemaFile>${basedir}/src/main/resources/config.xsd</schemaFile> - <generateLoader>true</generateLoader> - <generateSwitch>true</generateSwitch> <noNotification>true</noNotification> <noUnsettable>true</noUnsettable> </configuration> @@ -76,8 +74,6 @@ <id>company</id> <configuration> <schemaFile>${basedir}/src/test/resources/company.xsd</schemaFile> - <generateLoader>true</generateLoader> - <generateSwitch>true</generateSwitch> <noUnsettable>true</noUnsettable> </configuration> <goals> @@ -88,8 +84,6 @@ <id>customer</id> <configuration> <schemaFile>${basedir}/src/test/resources/customer.xsd</schemaFile> - <generateLoader>true</generateLoader> - <generateSwitch>true</generateSwitch> <noUnsettable>true</noUnsettable> </configuration> <goals>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]