Migration from RO9.5 to RO10 Notes

Will try to register the stones I get in the process.
Using Delphi RIO 10.3.3 RemObjects 10 (build 1469).

  1. Breaking change

Data dictionary field must now have an unique name between all the data dictionaries used n the project.
If don´t will raises an error: ‘duplicated not allowed’.

unit System.generics.collection line 7095

procedure TDictionary<TKey,TValue>.Add(const Key: TKey; const Value: TValue);
  index, hc: Integer;
  if Count >= FGrowThreshold then

  hc := Hash(Key);
  index := GetBucketIndex(Key, hc);
  if index >= 0 then
    raise EListError.CreateRes(@SGenericDuplicateItem);

  DoAdd(hc, not index, Key, Value);

Any chance to remove that restriction? I have many data dictionary fields with the same field name.

best regards


How I can reproduce this issue?

Will try to do a test case. Is a project working on 9.5, just try with version 10 and happens when try to access at runtime to a field present un several datadictcionary. My config is diferent. Each datamodule have schema, datadictionary and connections component. Load that from binary stream at runtime.

Ok, I test in depth,
The problem is raised when a DataDictionary have two fields with the same name. My original bug report was wroing.

That modification fix the error ignoring the second item. I ignore why schema modeler (old version) allow tio have many data dictionary fields with the same name. But if theres a reason then must find a way to allow to coexist both field name in the generics data dictionary .

procedure TSearcheableCollectionCached.RebuildList;
  i: integer;
  {$IFDEF ROUseGenerics}
  for i := 0 to Count -1 do
    // check theres not duplicated
    if not FNameList.ContainsKey(AnsiUpperCase(GetItemName(Items[i]))) then
  FNameList.Capacity:= Self.Count;
  for i := 0 to Count -1 do
  fNeedRebuild := False;

Have sense have two fields with the same name in datadicionary? I have no idea. If it can happens just add my change.

Best regards


you can’t have the same name (e.g. Field1) twice in the same data dictionary.
if it is possible, then it is a bug.
Why you can’t use template for name like %tablename%_%fieldname% ?
as a result, you will have something like table1_field1, Orders_ID, etc

Fine, will search the schema with the problem and fix.

Have no idea where to use that template. You mean in your code? In the data dictionary name at the schema editor?

If you mean in the schema , that template mis the opposite to the data dictionary use. Is suss pose to be reused on another tables, right? For that reason I change the proposed name .

Best regards.


you can name fields as you like, but they should be unique per data dictionary.
you can name fields like

  • varchar(20) as name20
  • varchar(40) as name40
    it will allow to be unique
1 Like

Maybe can be great if the exception have more specific information to detect the problem quickly.

Best regards


as you understand, we can’t change DASM3 because it was retired a few years ago …

Im talking about the runtime error.


What error you would like to see here?
something like duplicated not allowed: %name% ?

In this situation? Better some like:

Datadictionary %datadictionary% have duplicated field names on field %fieldname%. Sounds logic?

we can’t raise this exception on TDataDictionary level.
I can add exception here:

function TDACustomFieldCollection.Add(const aName: string; aType: TDADataType; aSize: integer): TDACustomField;
  result := Add;
  result.Name := aName;
  result.DataType := aType;
  result.Size := aSize;

but this class knows nothing about TDataDictionary

TDACustomFieldCollection has duplicated field names on field %fieldname%

but it won’t help too much …