Project

General

Profile

Bug #6293

dataset/temp-table options defined in interface

Added by Constantin Asofiei about 2 years ago. Updated about 2 years ago.

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

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

History

#2 Updated by Constantin Asofiei about 2 years ago

It is possible to have this:

interface oo.IBar:
   def temp-table ttx serialize-name "name1" field f1 as int serialize-name "field1".
   def dataset ds1 serialize-name "ds1" for ttx.
end.

class oo.Bar
implements oo.IBar:
   def protected temp-table ttx field f1 as int serialize-name "fieldOne".
   def protected dataset ds1 for ttx.
end.

The field, temp-table and dataset options defined in the interface are inherited at the implementation class. FWD just drops the interface definitions (which is OK, but some options need to be considered when building the implementation dataset/temp-table.

#4 Updated by Constantin Asofiei about 2 years ago

This was created after reviewing some customer application code, where I noticed that the temp-table at the interface and implementing class have different options, like SERIALIZE-NAME.

I really don't recall if I tested in OE, I guess not, as I can't duplicate it now.

If you try something like this:

   constructor public Bar():
      message buffer ttx:serialize-name buffer ttx:buffer-field("f1"):serialize-name.
      message dataset ds1:serialize-name.
   end.

and just run oo.Bar from OE, the serialize-name is the one from Bar definition and not IBar.

#5 Updated by Ovidiu Maxiniuc about 2 years ago

  • Status changed from New to WIP

I am trying to duplicate this but I cannot. Incrementally I created and modified additional classes like this:

interface oo.IFooBar:
   def temp-table ttx serialize-name "bufSerNameIface" field f1 as int serialize-name "fldSerNameIface".
   def dataset ds1 serialize-name "dsSerNameIface" for ttx.
end.

class oo.FooBar1
implements oo.IFooBar:
   def protected temp-table ttx serialize-name "bufSerNameClass" field f1 as int serialize-name "fldSerNameClass".
   def protected dataset ds1 serialize-name "dsSerNameClass" for ttx.

   constructor public FooBar1():
      message buffer ttx:serialize-name buffer ttx:buffer-field("f1"):serialize-name.
      message dataset ds1:serialize-name.
   end.
end.

class oo.FooBar2
implements oo.IFooBar:
   def protected temp-table ttx serialize-name "bufSerNameCls2" field f1 as int serialize-name "fldSerNameCls2".
   def protected dataset ds1 serialize-name "dsSerNameCls2" for ttx.

   constructor public FooBar2():
      message buffer ttx:serialize-name buffer ttx:buffer-field("f1"):serialize-name.
      message dataset ds1:serialize-name.
   end.
end.

class oo.FooBar3
implements oo.IFooBar:
   def protected temp-table ttx field f1 as int.
   def protected dataset ds1 for ttx.

   constructor public FooBar3():
      message buffer ttx:serialize-name buffer ttx:buffer-field("f1"):serialize-name.
      message dataset ds1:serialize-name.
   end.
end.

define variable fooBar1 as Progress.Lang.Object.
define variable fooBar2 as Progress.Lang.Object.
define variable fooBar3 as Progress.Lang.Object.

fooBar1 = new oo.FooBar1().
fooBar2 = new oo.FooBar2().
fooBar2 = new oo.FooBar3().

After running the code I get:

bufSerNameClass fldSerNameClass
dsSerNameClass
bufSerNameCls2 fldSerNameCls2
dsSerNameCls2
ttx f1
ds1
which is the exact result form running the same code on OE 11.6.3. Is it possible that some other option behaved differently?

#6 Updated by Constantin Asofiei about 2 years ago

  • Status changed from WIP to Rejected

Ovidiu, most likely this is not a real issue. I'm closing it.

Also available in: Atom PDF