code: private void checkReadonlyAccessForNativePKs(FieldDescriptorDef fieldDef, String checkLevel)
      {
          if (CHECKLEVEL_NONE.equals(checkLevel))
          {
              return;
          }
  
          String access  = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
          String autoInc = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_AUTOINCREMENT);
  
          if ("database".equals(autoInc) && !"readonly".equals(access))
          {
              LogHelper.warn(true,
                             FieldDescriptorConstraints.class,
                             "checkAccess",
                             "The field "+fieldDef.getName()+" in class "+fieldDef.getOwner().getName()+" is set to database auto-increment. Therefore the field's access is set to 'readonly'.");
              fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_ACCESS, "readonly");
          }
      }
docs: Checks that native primarykey fields have readonly access, and warns if not.
  
  @param fieldDef The field descriptor
  @param checkLevel The current check level (this constraint is checked in basic and strict)