existing Identifier with zero value

I have a dozen of tables that they have a record with Integer Identifier and its value is zero.
I am not going to change it, but I get an error from "Find" if the list of the records contains the record with the zero identifier. It is the TobjectMap that does not accept an entity with identifier's value 0.
Is it possible to overcome it without changing tables' content?
Thanks in advance

Hi Kounalakis,

Yes, it's possible, just add this mapping to Entities that have integer key fields where value may by zero:

TMyEntity = class

You may use -1 or any other value (that will not exists as valid Id on your table) to represent unsaved entities.



Thank you really a lot.... You saved me from a big trouble I had.
Aurelius is really an excellent product
This is also missing from the documentation @wlandgraf ....

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.