[keycloak-dev] Use UUID for IDs

Matthias Wessendorf matzew at apache.org
Fri Feb 7 05:45:13 EST 2014

+1 on UUIDs; we do same on UPS

On Friday, February 7, 2014, Stian Thorgersen <stian at redhat.com> wrote:

> I propose we use java.util.UUID to IDs generated by DB (JPA
> @GeneratedValue). Reasoning behind this is:

W/ the hibernate specific annotations?

> * IDs are the same independent of store used (JPA, Mongo, PicketLink,
> LDAP, etc)
> * Easy to support many RDBMS (some support sequence and/or identity, so it
> seems the recommended approach when you don't know what the db will be is
> table)
> * IDs can be generated without a "central" db
> Also, we'd like to be able to export all data to a json then import into
> any store. We then need to make sure there's no conflicts in IDs. For
> example you first use KC with H2, then export all data, import into MySQL,
> then export all data, import into Mongo. I can see that causing some issues
> with IDs generated by DB.
> This is related to DB issues (Mysql, PostgreSQL not working), Mongo store
> impl as well as move to using user id instead of username as the reference
> for a user.

> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org <javascript:;>
> https://lists.jboss.org/mailman/listinfo/keycloak-dev

Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20140207/f2974b86/attachment.html 

More information about the keycloak-dev mailing list