ID not set on entity class and sequencer definitions

You can. Use the IdUnsavedValue attribute to set a default 'unsaved id' different from zero.

  [Entity]
  [IdUnsavedValue(-1)]  // <-- insert this line. 
  [Table('employee')]
  [Description('')]
  [Sequence('employee_id_seq')]
  [Id('FId', TIdGenerator.IdentityOrSequence)]
  TEmployee = class(TMoonshineObject)
  (***)

HTH,

1 Like