Questions tagged [uuid]
A UUID (Universally Unique IDentifier) is an identifier that is created with the intent of being, as the name suggests, universally unique.
3,247
questions
1
vote
0
answers
15
views
cannot persist audit data with hibernate envers when using UUID as primary key (varchar)
I am using spring boot 2.7.2 and hibername 5.6.9.Final. I use Mariadb and the primary keys are defined as Varchar(255).
I store uuid for primary keys and now decided to use hibernate envers which I ...
1
vote
0
answers
14
views
Python Firebase / Firestore update function fails with ValueError: Non-alphanum due to path not being consumed
Updating via the Python Firestore API fails due to the update function splitting the string
resulting in an unescaped string that needs escaped
Traceback:
...
....
raise ValueError("Path {} not ...
1
vote
2
answers
44
views
Django self.model.DoesNotExist
I have a user with a field set as None:
None|Default User|07/07/2023
However, Django for some reason does not see it:
queryset=Q(id=UUID(User.objects.get(user_id=None)
...
raise self.model....
0
votes
2
answers
89
views
How do I get my Hex String to include intermediate zeroes in C++?
I am trying to output a UUID stored as a vector of bytes as a Hex String with dashes. When any individual byte has a leading zero, my output string skips it. I am using std::setw(2) and am still ...
0
votes
0
answers
20
views
"cannot cast type bigint to uuid" while changing db from sqLite3 to PostgressSql
So here is my Pet model and PetAttachmentImage model as well, in case if it can give any extra info.
The problem is that I created my whole backend on Django using default engine (sqlite3) and now I ...
1
vote
0
answers
12
views
How to quicky insert and modify UUID field in MySQL and IntelliJ database service?
I am struggling with inserting and modifying UUID field in MySQL. I use UUID for id and foreign key in Spring JPA and MySQL. I see that in MySQL, they are stored as binary(16). When I insert new value ...
-1
votes
0
answers
15
views
Why can we use uuid as the table's primary key? [duplicate]
The probability of a uuid matching is negligible, but not zero. but I have often seen it used as a primary key in a table. Couldn't this lead to potential problems? if you are lucky and get 2 ...
-1
votes
1
answer
19
views
npm uuid] Mocking doesn't work after the update in version
After updating to version 9.0.1, I'm unable to mock the return value of 'v4' in Jest. jest.mock('uuid'), jest.spyOn(uuid, 'v4'), and jest.replaceProperty(uuid, 'v4') are all not working. My Jest ...
-2
votes
0
answers
15
views
cross platform alternative of uuid-dev? [closed]
I have a project which depends on uuid-dev (a Ubuntu package), I'd like to make the project more cross-platform, which uuid library is close to uuid-dev ?
1
vote
1
answer
28
views
Get UUID from a EMF/XMI resource using PyEcore
I have an XMI file serialized in a Java/EMF program. Now, I need to read it using PyEcore, and I want to set the UUID and then retrieve it back while iterating over the resource.
This is my current ...
0
votes
0
answers
29
views
How can I generate a signed 32 bit Integer from a UUID and salt string?
I do not know my bit-twiddling well enough and could use some help.
I'm looking to generate a number to use as a 1-time "communication channel" between 2 different scripted agents to sync up ...
0
votes
1
answer
46
views
How to store a uuid type into bigint effectively?
In my application in Python, I have a function that accepts (_id: uuid.UUID) which is 128-bit value. I need to store this value into postgres database as a advisory lock using pg_advisory_xact_lock ...
0
votes
0
answers
18
views
React Native - why does uuid return "TypeError: undefined is not a function, js engine: hermes"?
I am working on a React Native project where I need to generate unique keys, so uuid was a good choice. But after a couple of tries, I receive the error message "TypeError: undefined is not a ...
1
vote
2
answers
45
views
Can __uuidof be used as a C-string const?
If I have a UUID defined somewhere in the source code:
class DECLSPEC_UUID("31A0884B-2B2F-4243-B4A0-2AEFE11FDD68") MyGuidClass;
Is there a way to use it for a static const C-string ...
0
votes
1
answer
39
views
Weird UUID behavior after switching to timescaledb-ha
This is a copy of https://github.com/timescale/timescaledb-docker-ha/issues/417
We have been running a database on the regular timescaledb:latest-pg14 image. We have a table (let's call it entities) ...
1
vote
0
answers
47
views
Gorm.Model ID as UUID with Mysql not allowing creation of data
I'm writing a Go (1.20) backend in Gin (v1.9.1) backend with Gorm (1.25.3), and for my data models I want to use UUID's as the ID. I've been trying to find a way to do this but always end up getting ...
0
votes
0
answers
18
views
Inequality in SQLAlchemy query when using SQLModels/Pydantic model with UUID type column mappings (with AzureSQL)
I am creating a FastAPI application on top of an existing database (AzureSQL), the SQL table ID column (primary key) is populated by:
CONVERT([varchar](36),newid())
My SQLModel class definition for ...
0
votes
1
answer
35
views
Symfony 6.2 translation error 'Undefined table: 7 ERROR: relation "ext_translations_id_seq" does not exist' postgresSql
I have a controller action:
#[Route('/store', name: 'store', methods: 'POST')]
public function store(Request $request): Response
{
$myEntity = new MyEntity();
$form = $this->createForm(...
0
votes
1
answer
29
views
Stub UUID using SINON with uuid version 9
I'm updating NodeJS and dependencies versions and got a problem trying to update uuid from v3.1.0 to v9.0.0 on my tests.
This was working before the update, but not anymore.
sinon = require('sinon'),
...
1
vote
1
answer
36
views
BLE uuid values
I have noticed that in BLE peripherals often the uuid values of the characteristics are similar to the that of the service they are under. For example if the service UUID is
A1EE0100-A572-4B01-A022-...
-1
votes
1
answer
35
views
Creating uuid from cryptographic hash function in Big Query
Given the table below:
first_name
last_name
description
John
Kennedy
Presidente of USA
Elizabeth
Mary
Queen of UK
I would like to hash the first_name and last_name column and create a UUID for ...
0
votes
0
answers
7
views
Will identifierForVendor change if I restore from a backup on same device?
I can't find precise information on that in the API doc. Are there any experiences if the identifierForVendor changes if the app was restored on same device via cloud backup / local backup?
At the ...
0
votes
1
answer
66
views
uuid = UUID(uuidString: String) create uppercase Letters
I have a problem with the function UUID(uuidString: String). Passing a UUID as String with lower case letters the above function generates a UUID with upper case letters. Can anyone give me a hint as ...
0
votes
1
answer
26
views
UUID value as function argument - Uncaught SyntaxError
I have a function which takes an "id" as argument:
<script>
function deleteBl(id){
fetch('', {
method: 'DELETE',
headers: {
'X-...
0
votes
1
answer
71
views
gorm scan error on column with type uuid[]
I have following models for a postgresql database:
SmallStruct struct {
FirstUUID uuid.UUID `gorm:"column:first_id"`
ListOfUUID []uuid.UUID `gorm:"column:list_of_id;type:uuid[...
-2
votes
2
answers
97
views
MongoDb, Convert UUID to string, in projection
I’m looking for a solution to convert a UUID to a string using projection. I’ve tried many different ways, but none of them are working.
The stranger thing is that Metabase displays the ID correctly, ...
0
votes
1
answer
50
views
Can I use AES to shuffle a UUIDv7?
In our web service, we use UUIDv7 as the primary key for resources, where the first 48 bits represent a timestamp. Some users are alarmed by the repetitive first segment, as they are accustomed to ...
1
vote
0
answers
44
views
Need Help Fixing Reoccurring Problem Error Message: 'Thread 1: "String does not represent a valid UUID"'
I am having problems with getting a bluetooth capability function running on my xcode project. It seems that I keep running into the same errer everytime I try to fix this. I don't know what routes I ...
0
votes
2
answers
38
views
Can uuid4 collide when generated by python processes on different kubernetes pods
When having replicas of the same pod with a single container running a single python process on kubernetes, will each python process still generate uuid.uuid4() ids that are practically unique across ...
2
votes
1
answer
192
views
How can I create a table with a UUID column in a Postgres db using SQLAlchemy?
I have created some tables using SQLALchemy 2.0's MappedAsDataclass and DeclarativeBase models, creating my tables like this:
class Base(MappedAsDataclass, DeclarativeBase):
"""...
2
votes
0
answers
28
views
Why I'm getting different UUIDs and a default int64 timestamp when consuming a kafka message?
Basically I'm producing a KAFKA message on my Golang project that has an Avro file defining the schema. Most of those is a *string type of field. One of this fields, the id, should be represented by a ...
0
votes
1
answer
306
views
Using the new type() for UUIDGenerator instead of strategy?
According to the documentation, the following usage is deprecated:
@GenericGenerator(
name = "UUID",
strategy = "org.hibernate.id.UUIDGenerator"
)
One ...
1
vote
2
answers
56
views
What is faster in Python, generating a uuid, using LRU cache or retrieve from a dict
I need to generate around a few hundreds of UUIDs and then I need to reuse each UUID a few thousands times.
What will give me better performance?
Option 1: Generate the uuid every time from the input?
...
-1
votes
1
answer
50
views
Add Custom Implementation to generate query with Exposed to use DB built-in function
I’m using Kotlin Exposed to interact MySQL in my service. Now I’m planning to create a new table, whose primary key is uuid converted to binary as binary(16) .
In that case, when I execute each query, ...
1
vote
0
answers
51
views
Column Foreign key is of type bigint but expression is of type uuid in Django
I want to use UUIDField for primary key. This is my model:
class Organization(models.Model):
id = models.UUIDField(default=uuid.uuid4, primary_key=True, editable=False)
name = models.CharField(...
0
votes
0
answers
27
views
Which information does a version 4 UUID carry?
Besides it's random data, I am wondering which information a v4 UUID contains. In section 4.4 of the RFC it says:
4.4. Algorithms for Creating a UUID from Truly Random or
Pseudo-Random Numbers
The ...
-2
votes
1
answer
36
views
how do I create a unique id in java with information that has been inputted by the user?
I need the program to create a unique ID for tasks, people, etc. I am having trouble, however with getting it to create a unique id with information provided by the user in the form of an input.
I ...
0
votes
0
answers
28
views
need to generate a MYSQL view with a unique column as UUID specificly as Binary16
I need to generate a view which contains a column with a unique column as binary16, all I get is a varBinary16 which is not what I need.
What I tried, also using AI:
this
CREATE VIEW view_name AS ...
2
votes
1
answer
80
views
How can UUID be globally unique?
I know the collision rate of UUID is practically zero as a fact, but why is such a low collision rate guaranteed globally?
According to the RFC 4122,
The version 4 UUID is meant for generating UUIDs ...
0
votes
0
answers
16
views
Generate UUID in application which has 40000 request per month
I need to maintain unique id for application which has 40000 application per month. I am considering using simple UUID. Is there any better approach of creating it?
UUID uuid = UUID.randomUUID();
...
0
votes
1
answer
209
views
UUID id is null after saving entity with spring-data-jdbc on sql server
I have following table (snippet):
create table users
(
user_id uniqueidentifier default newid() not null primary key,
name varchar(192),
...
)
and the entity:
import org....
1
vote
0
answers
50
views
how to fix Warning message of; package.json contains a custom build that is being ignored. after using 'firebase deploy'?
"WARNING: your package.json contains a custom build that is being ignored. Only the Next.Js default build script (e.g, "next build") is respected. If you have a more advanced custom ...
0
votes
0
answers
23
views
Using async code and RabbitMQ and generate uuid as correlationId, new uuid doesnt appear
Strange behavior when the uuid is generated and used later. As you can see in the screenshots, the first time works fine, but the second coralationId somehow gets the previous value.
Logs:
generate ...
1
vote
2
answers
47
views
How to convert _Uint8ArrayView to List<String>
In postgresql I have a column:
account_ids uuid[] NOT NULL DEFAULT array[]::uuid[],
when I receive data from database in my server app that using postgres: ^2.6.1 package, I'm getting this:
...
0
votes
2
answers
100
views
Why does Pydantic accept an empty string as a UUID [closed]
I have a Fast Api with Pydantic. Using BaseModel, i have a field that needs to be a UUID:
id: UUID. However when i send in an empty string it allows it, why is that?
0
votes
0
answers
219
views
Predicate failing with UUID's?
I have a fairly simple Categories class shown at the bottom of the post. keyValue is a UUID value, but this predicate is failing.
let keyPredicate = #Predicate<Categories> { $0.uuidKey == ...
0
votes
1
answer
69
views
error: uuid is not a function in react native
I am getting an error which drives me crazy in react native:
imports:
import 'react-native-get-random-values';
import { parse as uuidParse, stringify as uuidStringify, v4 as uuidv4 } from '...
1
vote
2
answers
81
views
Java containsKey() on ConcurrentHashMap returns false for a UUID key that present in the map
I am using an object of type
Map<Long, Map<UUID, OperationEntry>> stepOperations = new ConcurrentHashMap<>();
to control the execution of some operations. I have a Kafka message ...
0
votes
0
answers
23
views
I'm making a draggable todo list using UUID, but I would appreciate someone's help in converting it to retrieve data from MongoDB
import React, { useState } from "react";
import { DragDropContext, Draggable, Droppable } from "react-beautiful-dnd";
import uuid from "uuid/v4";
const itemsFromBackend =...