gdamour     2005/12/14 08:31:32

  Modified:    modules/openejb-builder/src/test/org/openejb/deployment
                        CMPSystemMethodIndicesTest.java
  Log:

  GERONIMO-1361 - CMP having a compound PK with only one field are not supported
  
  As pointed out by Manu George, buildFaultHandler and createCMPFieldAccessors
  should use EJB.isCompoundPK instead of the number of PK fields to identify
  compound PK.
  
  Revision  Changes    Path
  1.8       +5 -3      
openejb/modules/openejb-builder/src/test/org/openejb/deployment/CMPSystemMethodIndicesTest.java
  
  Index: CMPSystemMethodIndicesTest.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/openejb-builder/src/test/org/openejb/deployment/CMPSystemMethodIndicesTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CMPSystemMethodIndicesTest.java   1 Oct 2005 08:44:09 -0000       1.7
  +++ CMPSystemMethodIndicesTest.java   14 Dec 2005 13:31:32 -0000      1.8
  @@ -61,6 +61,7 @@
   import org.tranql.cache.CacheSlot;
   import org.tranql.cache.CacheTable;
   import org.tranql.cache.GlobalSchema;
  +import org.tranql.ejb.CMPField;
   import org.tranql.ejb.EJB;
   import org.tranql.ejb.EJBSchema;
   import org.tranql.identity.IdentityDefinerBuilder;
  @@ -76,10 +77,11 @@
       public void testSystemMethodIndices() throws Exception {
           CMPContainerBuilder builder = new CMPContainerBuilder();
           builder.setClassLoader(MockCMPEJB.class.getClassLoader());
  -        EJB ejb = new EJB("mock", "mock");
  +        EJB ejb = new EJB("mock", "mock", Integer.class, null, null, false);
  +        ejb.addCMPField(new CMPField("field1", Integer.class, true));
           EJBSchema ejbSchema = new EJBSchema("schema");
           ejbSchema.addEJB(ejb);
  -        CacheTable cacheTable = new CacheTable("mock", new CacheSlot[0], 
null, null, null, null);
  +        CacheTable cacheTable = new CacheTable("mock", new CacheSlot[] {new 
CacheSlot("field1", Integer.class, null)}, null, null, null, null);
           GlobalSchema globalSchema = new GlobalSchema("schema");
           globalSchema.addCacheTable(cacheTable);
           builder.setEJBName("mock");
  
  
  

Reply via email to