Hello. I designed the following table in the datamodeler
UserGUID: TGuid; // ** primary key field
When the model gets generated, Datamodeler always emits
atribute for the primary key field. This causes an error when POSTing
the corresponding entity with all fields prefilled by the client:
'Cannot save object of class . The object already has an id, use merge instead.'
The cause of this error is the check in the Objectmanager code:
if FObjects.HasIdValue(Entity) and not EntityType.SafeId.IsUserAssignedId then
When posted, my object HAS UserGUID value prefilled and IsUserAssignedId function returns
false (it returns TRUE only when primary key contains more than one field or the generator
inherits from TIdGeneratorNone)
How do I force the DataModeler to emit TIdGeneratorNone for the UserGUID field?
I would hate to correct this manually in the generated unit. Is there a way to achieve this
directly in the model designer?