The issue is documented in JADE par #55301.
Description:
This applies to any JADE database that has been, or will be upgraded to 6.3, where:
- The application creates instances of user objects using the 'as' clause in the create instruction, and
- The type to be created is variable and not an explicit class, and
- The ‘Persistent’ keyword is not used to explicitly create the object as a persistent one
Code: Select all
createEmployee(entity : Employee io; cls : Class) updating;
begin
create entity as cls; // an issue after upgrading to 6.3
- The issue does not manifest for object creates not using the ‘as’ clause
- The issue does not manifest for object creates that use the keyword persistent/transient’
- The issue does not manifest for object creates where the type is explicitly stated
Code: Select all
create entity; //not an issue
create entity as type persistent; //not an issue
create entity as SalariedEmployee; //not an issue
Hotfix 6.3.07.10 has been released that provides a mechanism for recompiling affected methods after the upgrade. This fix is also present in the JADE 6.3.08 release.
The RootSchema method: Schema::_fixCreateAs() will find any JADE methods that use 'create <object> as <variable>' in any schema and recompile them.
It is sufficient to run this fix once per JADE system (instructions for doing this are given below).
Running ::fixCreateAs() will create a file called 'FixCreateAs.log' in the system log directory that lists all such methods successfully compiled and any methods that failed to compile.
The file output is of the following form:
Note that you do not need to be concerned by reported fixes for non user schemas (such as the JadeReportWriterSchema schema).Checking for methods that use create as variable...
Checking for create as <variable> statements complete, errors: 0
methods with create as <variable> statements: 1
methods recompiled successfully: 1
methods with compile errors: 0
The following methods were successfully compiled:
Contact55301::EmployeeFactory::createEmployee
To run the method, create and run a JadeScript method as follows:
Code: Select all
fixCreateAs();
begin
currentSchema._fixCreateAs();
end;
If access to the target environment's IDE is not available the fix may be run in batch mode, e.g.
If the target environment is source stripped then source will need to be loaded before the _fixCreateAs() method is executed. This is because the fix requires that source in order to recompile any affected methods. An alternative solution is to perform a schema load of affected methods after the upgrade and ensure that those methods are recompiled by specifying the CompileUnchangedMethods option in the jadloadb.exe invocation.jadloadb.exe path=<Path> ini=<IniFile> server=singleUser executeSchema=RootSchema executeClass=Schema executeMethod=_fixCreateAs endJade