Edit: NodejS, MacOS, maria db
I have created two tables in the database manager: main table - users
, subtable - user_details
In the users
table, I have setup user_id
with datatype UUID
. In the user_details
sub-table, user_id
field has been created as a Reference (FK) and linked to user_id
field in the users
main table (created as a subtable in the database manager).
When a record is inserted in the users
table, user_id
field is correctly generating a UUID
. However, when I try to insert a record in the user_details
table and use user_id
UUID as generated in the previous insert step, the value being inserted is a random value instead of the actual UUID.
How do I insert the correct value of user_id in the user_details table? I may have missed a step when setting up main & sub tables in the database manager correctly or there may be a different requirement when using the Reference links with a UUID datatype. Any help to resolve this issue is greatly appreciated.