objectbox-java icon indicating copy to clipboard operation
objectbox-java copied to clipboard

UUIDs as object identifiers (maybe string based?)

Open Ditscheridou opened this issue 4 years ago • 1 comments

I know that there are some tickets around, but honestly, its quite annoying to not have this key feature of a database implemented. I saw, that there were some efforts in 2017 (thats 4 years ago btw.) but nothing changed since. So instead of only having Long as an id primary type, i also would like to have String and UUID. I know, that there are maybe some performance impacts with that, but that should not matter, since its the responsibility of the developer to choose the correct id types.

Use case scenario for UUIDs: Distributed systems, where you identify your entity by its globally unique UUID, and you dont want to deal with internal system ids and the global UUID.

Ditscheridou avatar Jul 26 '21 10:07 Ditscheridou

String is already covered by #167 so I suggest to focus on UUIDs here? These could also be string based, so maybe it would come down assign a new UUID (string) for new entities?

PS.: btw, while the progress on this topic is certainly not as we wish it to be ourselves, there is some progress nevertheless (unique constraint, which is a prerequisite technically).

greenrobot avatar Jul 29 '21 15:07 greenrobot