Project

General

Profile

Bug #1704

legacy DB name mapping

Added by Constantin Asofiei over 11 years ago. Updated over 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

ca_test20091204b.zip (18.1 KB) Constantin Asofiei, 10/29/2012 08:43 AM

History

#1 Updated by Constantin Asofiei over 11 years ago

This email is for the legacy DB name mapping task.

A. What is done:

Attached are the changes related to the historical names for tables and fields, to be used in persistence-related error messages. What is done are the following:
1. conversion changes to save the historical name in the dmo_index.xml file
2. dtd changes to add the "historical" name to the xml definition
3. DMOIndex was modified to read and retrieve the historical name for a field.

What still needs to be done is to identify all the places in persist package where error messages use the field name, to use the historical name instead.

B. Original requirements:

From GES (on 09/04/2009):

In order to duplicate the 4GL error messages exactly, we need to change our conversion and runtime to maintain and utilize a mapping of the database/table/field/index 4GL names to the corresponding new P2J names. We are not talking about changing how we convert the persistence related code/database schema. This is only a mapping facility to allow error messages to properly map back to the original names before outputting the message. That way any errors that are expected to be seen will appear exactly the same in P2J. This incompatibility was accepted by TIMCO, but it does cause us problems in our automated testing. And we don't know if all future customers will also accept this difference. So we want to fix it.

Eric will provide more guidance on this, but from what I understand it entails this:

1. During conversion we must record this mapping data in a form that can be accessed at runtime. I guess this may appear in the dmo_index.xml, as static data in the DMOs or somewhere else.

2. At runtime a lookup facility needs to be available to allow the various schema elements to reverse map the P2J name into the 4GL equivalent.

3. All the error handling code that has schema names embedded must be updated to use the reverse mapping lookup before generating the message.

From ECF (on 09/07/2009):

The P2J-to-4GL database name task that Greg described in his e-mail of Sep. 4 08:43 AM EDT. The original 4GL names are retained in the majic.p2o file with the "historical" annotation during conversion and should be stored in the dmo_index.xml file, which is built into majic.jar for runtime use. This file is read by the DMOIndex.java file the first time it is needed. Use the code in that class as an example to add the required new features. The lookup mechanism should be tolerant of an entry not being in the dmo_index.xml file, and should instead use the current name. That way, as new DMO types/tables are added, the developers will not need to make updates to this file, and it will be used for legacy purposes only.

Also available in: Atom PDF