code: public static ZooFieldDef create(ZooClassDef declaringType, String fieldName,
  			ZooClassDef fieldType, int arrayDim) {
  		String typeName = fieldType.getClassName();
  		JdoType jdoType;
  		if (arrayDim > 0) {
  			jdoType = JdoType.ARRAY;
  		} else {
  			jdoType = JdoType.REFERENCE;
  		}
          long fieldOid = declaringType.jdoZooGetNode().getOidBuffer().allocateOid();
  		ZooFieldDef f = 
  				new ZooFieldDef(declaringType, fieldName, typeName, arrayDim, jdoType, fieldOid);
  		return f;
  	}
docs: Creates references and reference arrays  to persistent classes.
  @param declaringType the type that contains the field
  @param fieldName the name of the field
  @param fieldType The ZooClassDef of the target class of a reference.
  @param arrayDim the dimensionality of the array (if the field is an array)
  @return ZooFieldDef