Base solution for your next web application
Open Closed

Issue - Primary Key - String VS Guid #7644


User avatar
0
AuroraBMS created

Hi,

I've tried using the primary key string just now (Logically it would allow you to use a custom string value as the primary key?) The problem I am experiencing however is the way the system operates when using it and how it interacts with results provided.

When integrate with the system through the API with lets say ItemMasterData table for this example. How the system reacts to me providing a string value as the primary key is as follows:

Table consists of the following columns: Id (String Primary Key) - This needs to be used as a unique Item Code Description (String) Barcode (String)

A very basic table that returns a success when i provide it data but when I look on the portal/database it does not have data even though the system has given me around 3000 successful entries, no failures, no actual data. Results appear successful in the audit log as well.

Now when I add data through the portal itself, the string value is basically to an extent just a string representation of a GUID?

Is there somewhere I can find some clarity on the primary keys especially as to what use "String" has if it is theoretically just a Guid.ToString() concept?

Also is there a way to handle what I am trying to do? To have unique string Identifiers for master data without requiring a secondary column to load it in and also having extra code to verify and slow down the process when large quantities of data needs to flow through the system.

Regards, Gideon Badenhorst


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @AuroraBMS

    Could you share your sample entity and the app service method which returns the records ? We will try to reproduce this.

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @AuroraBMS

    Did you fix your problem ?