T
T
Tshmt2019-11-23 19:16:21
JavaScript
Tshmt, 2019-11-23 19:16:21

How to merge 2 objectId into one unique id?

Hello.
Is there any way to make unique. id of 2x objectId
idea: md5( [objectId(abc), objectId(cba)].join(“”) )
but md5( [objectId(cba), objectId(abc)].join(“”) )
would be another hash .
How can you get the same regardless of the order in the array.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2019-11-23
@firedragon

Everything is possible, another question is why? uuid is unique by definition, composite keys are used in other cases, for example, when categorizing by country - region - city
https://www.percona.com/blog/2013/10/11/introducin...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question