Project

General

Profile

Bug #10841

model table name is used in error messages for a 'like' temp-table definition

Added by Constantin Asofiei 8 months ago. Updated 6 months ago.

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

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
production:
No
env_name:
topics:

History

#4 Updated by Constantin Asofiei 8 months ago

For a temp-table defined as:

def temp-table tt1 like book.

in error messages the label from the model (i.e. Book) is used, instead of the temp-table name. But this is only if the model has a LABEL option - which AFAIK can only be set for schema tables, in the .df file.

Now, the other difference in error messages is that in such cases (and also schema tables I think), for already exists with errors, the field names are not set, only the values.

I have a deja-vu that the issue with not having the field names in the already exists with index validation errors was already encountered in another customer project (the code from Validation.getFailUniqueIndexMessage).

#5 Updated by Constantin Asofiei 8 months ago

So the rule I think is this, for the unique validation 'already exists with' message:
  • for temp-tables, no field name is used, and the LABEL from the 'like' model (when set) is used instead of buffer name
  • for perm tables, the LABEL (when set) must be used for both fields and buffer

#6 Updated by Constantin Asofiei 8 months ago

  • Status changed from New to Review
  • Assignee set to Constantin Asofiei
  • % Done changed from 0 to 100
  • reviewer Alexandru Lungu added
Created 10841a from trunk rev 16292; rev 16293 contains:
  • A LIKE temp-table definition will copy the i.e. LABEL from the model table; this is used in unique index validation messages.

Alex, please review.

#7 Updated by Constantin Asofiei 6 months ago

  • Status changed from Review to Closed

Branch 10841a was merged to trunk rev 16394 and archived.

Also available in: Atom PDF