Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

How to declare @id as java.util.UUID (instead of only String or Int) #431

Open
alain-marcel opened this issue Sep 25, 2019 · 4 comments
Open
Assignees
Labels
Milestone

Comments

@alain-marcel
Copy link

Currently, we can only use String, Integer or int types as a @id.
Would it be possible to add java.util.UUID ?
This type is natively support in many databases.
It would be great in the domain entity class to use a java.util.UUID instead of String.
I currently use a home made library to access cosmosdb/documentdb, that manage id as UUID.
I want to migrate to spring data comsosdb library, and this issue is the only lock.

If you do not plan to add this feature soon, could you indicate a workaround ?
It is not easy to overload "private Field getIdField(Class<?> domainClass)" method
of com.microsoft.azure.spring.data.cosmosdb.repository.support.DocumentDbEntityInformation class because method is private...

Thanks for any help.

@kushagraThapar
Copy link
Collaborator

I believe this issue can be generalized through : #539

@kushagraThapar kushagraThapar self-assigned this Jul 1, 2020
@kushagraThapar kushagraThapar added this to the 3.x.x milestone Jul 1, 2020
@helayoty
Copy link

Do we have a date for fixing this issue?

@alain-marcel
Copy link
Author

alain-marcel commented Oct 26, 2020 via email

@kushagraThapar
Copy link
Collaborator

@alain-marcel - we only support strings and int / numbers for id annotation as of now.
Also, we have moved our code base to new repository - https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos
So new issues should be filed there.

For now, let's ask @mbhaskar - can you please take a look at this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants