Auto-increment Integer Primary Keys in Ontology

hi!
Checking if there’s updated guidance on having sequential integers as object primary keys/auto-increment?
I’m currently trying to force this behaviour using functions - i.e. find the max existing PK and increment by 1, but wanted to check if there are any GA/w.i.p product features we can leverage here?
E.g. have we considered “Unique Identifier” support for Integer PKs just like string PKs in Ontology Action forms?

2 Likes

Actions allow auto-generating string UUID primary keys but don’t have first-class support for integer primary keys.
You can achieve the desired behavior using a function-backed action by querying the largest current primary key and then generating the next object with an incremented integer but this could lead to your actions failing based on conflicting edits and you may have to retry the actions if the actions are run frequently.