Skip to content

Active Record (ORM) does not allow type guid as primary key #552

@marcelojaloto

Description

@marcelojaloto

When you have a primary key field as uuid in the Postgres SQL, the DMVC framework feature Active Record raise the exception: "Allowed primary key types are: (Nullable)Integer, (Nullable)Int64, (Nullable)String - found: guid".

This occurs at the line 1182 of the unit MVCFramework.ActiveRecord in the method InitTableInfo.

My sollution include de lines below in the method InitTableInfo:

else if lPrimaryFieldTypeAsStr.EndsWith('guid') then
begin
    fPrimaryKeyFieldType := ftGuid;
end

Can i to send a Pull request with this solution? Or exist other solution for this case?

Thanks,
Marcelo Jaloto

Metadata

Metadata

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions