You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by dw...@apache.org on 2010/03/01 22:03:27 UTC

svn commit: r917716 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test: java/org/apache/openjpa/persistence/jpql/entities/ java/org/apache/openjpa/persistence/jpql/expressions/ resources/META-INF/ resources/org/apache/openjpa/persistence/jpql/expres...

Author: dwoods
Date: Mon Mar  1 21:03:26 2010
New Revision: 917716

URL: http://svn.apache.org/viewvc?rev=917716&view=rev
Log:
OPENJPA-855 Initial JPQLIndex M2M tests

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IColumnEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedNameEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedNameEntity.java   (with props)
Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestIndex.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IColumnEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IColumnEntity.java?rev=917716&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IColumnEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IColumnEntity.java Mon Mar  1 21:03:26 2010
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.persistence.jpql.entities;
+
+import java.util.List;
+
+public interface IColumnEntity extends INameEntity {
+
+    public List<IOrderedEntity> getEntities();
+
+    public void setEntities(List<IOrderedEntity> columns);
+
+    public void addEntity(IOrderedEntity entity);
+
+    public IOrderedEntity removeEntity(IOrderedEntity entity);
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IColumnEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedNameEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedNameEntity.java?rev=917716&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedNameEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedNameEntity.java Mon Mar  1 21:03:26 2010
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToMany;
+import javax.persistence.OrderColumn;
+
+@Entity
+public class OrderedNameEntity implements IColumnEntity, java.io.Serializable {
+
+    @Id
+    private int id;
+    
+    private String name;
+
+    @ManyToMany
+    @OrderColumn
+    private List <IOrderedEntity> entities;
+
+    
+    public OrderedNameEntity() {
+    }
+
+    public OrderedNameEntity(String name) {
+        this.id = name.charAt(0) - 'A' + 1;
+        this.name = name;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String toString() {
+        return "OrderedNameEntity[" + id + "]=" + name;
+    }
+
+    public List<IOrderedEntity> getEntities() {
+        return entities;
+    }
+
+    public void setEntities(List<IOrderedEntity> entities) {
+        this.entities = entities;
+    }
+
+    public void addEntity(IOrderedEntity entity) {
+        if( entities == null) {
+            entities = new ArrayList<IOrderedEntity>();
+        }
+        entities.add(entity);
+    }
+
+    public IOrderedEntity removeEntity(IOrderedEntity entity) {
+        IOrderedEntity rtnVal = null;
+        if( entities != null) {
+            if( entities.remove(entity) )
+                rtnVal = entity;
+        }
+        return rtnVal;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedNameEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedNameEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedNameEntity.java?rev=917716&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedNameEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedNameEntity.java Mon Mar  1 21:03:26 2010
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.ManyToMany;
+import javax.persistence.OrderColumn;
+
+public class XMLOrderedNameEntity implements INameEntity, java.io.Serializable {
+
+    private int id;
+    
+    private String name;
+
+    @ManyToMany
+    @OrderColumn
+    private List <IColumnEntity> columns;
+
+
+    public XMLOrderedNameEntity() {
+    }
+
+    public XMLOrderedNameEntity(String name) {
+        this.id = name.charAt(0) - 'A' + 1;
+        this.name = name;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String toString() {
+        return "XMLOrderedNameEntity[" + id + "]=" + name;
+    }
+    
+    public List<IColumnEntity> getColumns() {
+        return columns;
+    }
+
+    public void setColumns(List<IColumnEntity> columns) {
+        this.columns = columns;
+    }
+
+    public void addColumns(IColumnEntity column) {
+        if( columns == null) {
+            columns = new ArrayList<IColumnEntity>();
+        }
+        columns.add(column);
+    }
+
+    public IColumnEntity removeColumns(IColumnEntity entity) {
+        IColumnEntity rtnVal = null;
+        if( columns != null) {
+            if( columns.remove(entity) )
+                rtnVal = entity;
+        }
+        return rtnVal;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedNameEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestIndex.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestIndex.java?rev=917716&r1=917715&r2=917716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestIndex.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestIndex.java Mon Mar  1 21:03:26 2010
@@ -27,17 +27,18 @@
 import javax.persistence.Query;
 
 import org.apache.openjpa.lib.log.Log;
-import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
-import org.apache.openjpa.persistence.OpenJPAPersistence;
+import org.apache.openjpa.persistence.jpql.entities.IColumnEntity;
 import org.apache.openjpa.persistence.jpql.entities.INameEntity;
 import org.apache.openjpa.persistence.jpql.entities.IOrderedElements;
 import org.apache.openjpa.persistence.jpql.entities.IOrderedEntity;
 import org.apache.openjpa.persistence.jpql.entities.OrderedElementEntity;
 import org.apache.openjpa.persistence.jpql.entities.OrderedManyToManyEntity;
+import org.apache.openjpa.persistence.jpql.entities.OrderedNameEntity;
 import org.apache.openjpa.persistence.jpql.entities.OrderedOneToManyEntity;
 import org.apache.openjpa.persistence.jpql.entities.UnorderedNameEntity;
 import org.apache.openjpa.persistence.jpql.entities.XMLOrderedElementEntity;
 import org.apache.openjpa.persistence.jpql.entities.XMLOrderedManyToManyEntity;
+import org.apache.openjpa.persistence.jpql.entities.XMLOrderedNameEntity;
 import org.apache.openjpa.persistence.jpql.entities.XMLOrderedOneToManyEntity;
 import org.apache.openjpa.persistence.jpql.entities.XMLUnorderedNameEntity;
 import org.apache.openjpa.persistence.proxy.TreeNode;
@@ -61,7 +62,8 @@
         XMLOrderedOneToManyEntity(XMLOrderedOneToManyEntity.class),
         XMLOrderedManyToManyEntity(XMLOrderedManyToManyEntity.class),
         UnorderedNameEntity(UnorderedNameEntity.class),
-        XMLUnorderedNameEntity(XMLUnorderedNameEntity.class);
+        XMLUnorderedNameEntity(XMLUnorderedNameEntity.class),
+        OrderedNameEntity(OrderedNameEntity.class);
 
         private Class<?> clazz;
         private String fullEntityName;
@@ -92,6 +94,7 @@
 
     @Override
     protected String getPersistenceUnitName() {
+        // this sets up the testcase code so our EMF is created and cleaned up for us
         return "JPQLIndex";
     }
 
@@ -99,13 +102,16 @@
     public void setUp() {
         super.setUp(CLEAR_TABLES, TreeNode.class, 
             OrderedElementEntity.class, UnorderedNameEntity.class,
-            OrderedOneToManyEntity.class, OrderedManyToManyEntity.class);
+            OrderedOneToManyEntity.class, OrderedManyToManyEntity.class,
+            OrderedNameEntity.class);
             // XMLOrderedOneToManyEntity.class, XMLOrderedManyToManyEntity.class,
-            // XMLOrderedElementEntity.class, XMLUnorderedNameEntity.class);
+            // XMLOrderedElementEntity.class, XMLUnorderedNameEntity.class,
+            // XMLOrderedNameEntity.class);
 
         log =  emf.getConfiguration().getLog("test");
     }
-        
+
+    // original testcase by Catalina
     public void testO2MTreeQueryIndex() {
         int[] fanOuts = {2,3,4};
         createTreeNodeEntities(fanOuts);
@@ -120,6 +126,7 @@
         em.close();                
     }
 
+    // Testcases added by Donald with code reused from annonxml tests by Albert
     public void testO2MQueryIndex() {
         createEntities(JPQLIndexEntityClasses.OrderedOneToManyEntity, UnorderedNameEntity.class);
         verifyEntities(JPQLIndexEntityClasses.OrderedOneToManyEntity, UnorderedNameEntity.class);
@@ -130,15 +137,15 @@
         verifyEntities(JPQLIndexEntityClasses.XMLOrderedOneToManyEntity, XMLUnorderedNameEntity.class);
     }
 
-    /* TODO
     public void testM2MQueryIndex() {
+        createEntities(JPQLIndexEntityClasses.OrderedManyToManyEntity, OrderedNameEntity.class);
+        verifyEntities(JPQLIndexEntityClasses.OrderedManyToManyEntity, OrderedNameEntity.class);
     }
-    */
 
-    /* TODO
     public void testM2MXMLQueryIndex() {
+        createEntities(JPQLIndexEntityClasses.OrderedManyToManyEntity, XMLOrderedNameEntity.class);
+        verifyEntities(JPQLIndexEntityClasses.OrderedManyToManyEntity, XMLOrderedNameEntity.class);
     }
-    */
 
     public void testElementQueryIndex() {
         createEntities(JPQLIndexEntityClasses.OrderedElementEntity, String.class);
@@ -181,7 +188,10 @@
         if (IOrderedEntity.class.isAssignableFrom(entityType.getEntityClass())) {
             if (INameEntity.class.isAssignableFrom(elementClass)) {
                 log.trace("** Test INameEntity modifications on IOrderedEntity.");
-                createOrderedEntities(entityType, (Class<INameEntity>)elementClass);
+                createO2MEntities(entityType, (Class<INameEntity>)elementClass);
+            } else if (IColumnEntity.class.isAssignableFrom(elementClass)) {
+                log.trace("** Test IColumnEntity modifications on IOrderedEntity.");
+                createM2MEntities(entityType, (Class<IColumnEntity>)elementClass);
             } else {
                 fail("createEntities(IOrderedEntity) - Unexpected elementClass=" + elementClass.getSimpleName());
             }
@@ -197,7 +207,7 @@
         }
     }
         
-    private void createOrderedEntities(JPQLIndexEntityClasses entityType, Class<INameEntity> elementClass)
+    private void createO2MEntities(JPQLIndexEntityClasses entityType, Class<INameEntity> elementClass)
     {
         EntityManager em = null;
         
@@ -209,9 +219,11 @@
                 elementClass.getName().lastIndexOf('.') + 1);
             Integer entityId = 1;
             
+            // create the entity
             IOrderedEntity newEntity = (IOrderedEntity)constructNewEntityObject(entityType);
             newEntity.setId(entityId);
-            // create the entity elements to add
+            
+            // create the elements to add
             Constructor<INameEntity> elementConstrctor = elementClass.getConstructor(String.class);
             List<INameEntity> newElements = new ArrayList<INameEntity>();
             for (int i=0; i<Element_Names.length; i++) {
@@ -224,16 +236,6 @@
             em.getTransaction().begin();
             for (INameEntity newElement : newElements)
             {
-                /* For Many to Many cases
-                    jpaRW.getEm().persist(newElementB);
-                    if (elementClass == OrderedNameEntity.class || elementClass == XMLOrderedNameEntity.class) {
-                        if( listFieldName.charAt(1) == 'o') {
-                            setColumnMethod.invoke(new2Boy, newEntity);
-                        } else {
-                            addColumnsMethod.invoke(new2Boy, newEntity);
-                        }
-                    }
-                */
                 em.persist(newElement);
                 newEntity.addEntity((INameEntity)newElement);
             }
@@ -241,7 +243,68 @@
             em.getTransaction().commit();
             em.clear();
 
-            // verify the entities were stored
+            // verify the entity was stored
+            log.trace("Verifing the entity was stored");
+            IOrderedEntity findEntity = em.find(entityClass, entityId);
+            assertNotNull("Found entity just created", findEntity);
+            assertEquals("Verify entity id = " + entityId, entityId.intValue(), findEntity.getId());
+            assertEquals("Verify entity name = " + entityClass.getName(), entityClass.getName(),
+                findEntity.getClass().getName());
+
+        } catch (Throwable t) {
+            log.error(t);
+            throw new RuntimeException(t);
+        } finally {
+            if (em != null) {
+                if (em.getTransaction().isActive()) {
+                    em.getTransaction().rollback();
+                }
+                em.close();
+                em = null;
+            }
+        }
+    }
+    
+    private void createM2MEntities(JPQLIndexEntityClasses entityType, Class<IColumnEntity> elementClass)
+    {
+        EntityManager em = null;
+        
+        try {
+            Class<IOrderedEntity> entityClass =
+                (Class<IOrderedEntity>)Class.forName(entityType.getEntityClassName());
+            String entityClassName = entityType.getEntityName();
+            String elementClassName = elementClass.getName().substring(
+                elementClass.getName().lastIndexOf('.') + 1);
+            Integer entityId = 1;
+            
+            // create the entity
+            IOrderedEntity newEntity = (IOrderedEntity)constructNewEntityObject(entityType);
+            newEntity.setId(entityId);
+            // persist the entity
+            em = emf.createEntityManager();
+            em.getTransaction().begin();
+            em.persist(newEntity);
+            
+            // create and persist the elements
+            Constructor<IColumnEntity> elementConstrctor = elementClass.getConstructor(String.class);
+            List<INameEntity> newElements = new ArrayList<INameEntity>();
+            IColumnEntity newElement;
+            for (int i=0; i<Element_Names.length; i++) {
+                newElement = elementConstrctor.newInstance(Element_Names[i]);
+                // add parent relationship
+                newElement.addEntity(newEntity);
+                em.persist(newElement);
+                newElements.add(newElement);
+            }
+            
+            // update entity with elements
+            log.trace("Adding " + newElements.size() + " of " + elementClassName + " to " + entityClassName);
+            newEntity.setEntities(newElements);
+            em.persist(newEntity);
+            em.getTransaction().commit();
+            em.clear();
+
+            // verify the entity was stored
             log.trace("Verifing the entity was stored");
             IOrderedEntity findEntity = em.find(entityClass, entityId);
             assertNotNull("Found entity just created", findEntity);
@@ -315,6 +378,9 @@
             if (INameEntity.class.isAssignableFrom(elementClass)) {
                 log.trace("** Verify INameEntity modifications on IOrderedEntity.");
                 verifyOrderedEntities(entityType, (Class<INameEntity>)elementClass);
+            } else if (IColumnEntity.class.isAssignableFrom(elementClass)) {
+                log.trace("** Verify IColumnEntity modifications on IOrderedEntity.");
+                verifyOrderedEntities(entityType, (Class<INameEntity>)elementClass);
             } else {
                 fail("verifyEntities(IOrderedEntity) - Unexpected elementClass=" + elementClass.getSimpleName());
             }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml?rev=917716&r1=917715&r2=917716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml Mon Mar  1 21:03:26 2010
@@ -331,6 +331,8 @@
         <class>org.apache.openjpa.persistence.jpql.entities.XMLOrderedOneToManyEntity</class>
         <class>org.apache.openjpa.persistence.jpql.entities.UnorderedNameEntity</class>
         <class>org.apache.openjpa.persistence.jpql.entities.XMLUnorderedNameEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.OrderedNameEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.XMLOrderedNameEntity</class>
         <properties>
             <property name="openjpa.jdbc.SynchronizeMappings"
                 value="buildSchema" />

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml?rev=917716&r1=917715&r2=917716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml Mon Mar  1 21:03:26 2010
@@ -54,4 +54,14 @@
         </attributes>
     </entity>
 
+    <entity class="org.apache.openjpa.persistence.jpql.entities.XMLOrderedNameEntity">
+        <attributes>
+            <id name="id" />
+            <basic name="name" />
+            <many-to-many name="columns">
+                <order-column/>
+            </many-to-many>
+        </attributes>
+    </entity>
+
 </entity-mappings>

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml?rev=917716&r1=917715&r2=917716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml Mon Mar  1 21:03:26 2010
@@ -37,6 +37,8 @@
         <class>org.apache.openjpa.persistence.jpql.entities.XMLOrderedOneToManyEntity</class>
         <class>org.apache.openjpa.persistence.jpql.entities.UnorderedNameEntity</class>
         <class>org.apache.openjpa.persistence.jpql.entities.XMLUnorderedNameEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.OrderedNameEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.XMLOrderedNameEntity</class>
         <properties>
             <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
             <!-- <property name="openjpa.Log" value="SQL=TRACE"/> -->