Hi,
is there any way to support modelling the table where Primary Key column type is integer?
What I am trying to achieve
-
I have created table in test model repository:
-
I have rendered Menu item with screen and screen section
-
I have setup Default template to make sure the Id is not null
-
I opened the screen inside Origam Client
Everything works fine until I try to save record.
I expect
New record is saved.
What I get
- I get error
400
- Inside network tracing I see this error:
Additional notes
In the code, there is class Update Data rowId typed to UniqueIdentifier
which is causing an error:
public class UpdateData
{
public Guid RowId { get; set; }
public Dictionary<string, object> Values { get; set; }
}
There are probably much more limitations regarding UniqueIdentifiers
inside Origam server code. I found out for examle DataAuditLog
that is completely dependant on UniqueIdentifier
Id.
Why I would like to know how to model the scenario
I have existing database table where primary key column’s type is integer
, I would like to allow user to edit the data inside Origam without modifying the table. Is there any way how to achieve working model with Integer primary key column?
The only way I imagine is:
- Add new additional column into an entity, i.e.
GuidId
asUniqueIdentifier
- Initialize column with guids, i.e. using
cast(FORMAT(Id, '00000000-0000-0000-0000-000000000000') as UNIQUEIDENTIFIER)
- Make sure that the column is always correctly filled in.
Do you have any tips or it is considered as Origam’s limitation?