You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My transactions table uses a uuid which is stored as bytes in the database.
I would like to know how to search for a partial uuid? Obviously, since we are using bytes, the data is stored as a binary in the table so in theory I need to convert the partial uuid string to a binary and then to search on that.
Is there anyway to do this natively with UUID?
If I had a full UUID, I am simply going to use something like so:
My transactions table uses a uuid which is stored as bytes in the database.
I would like to know how to search for a partial uuid? Obviously, since we are using bytes, the data is stored as a binary in the table so in theory I need to convert the partial uuid string to a binary and then to search on that.
Is there anyway to do this natively with UUID?
If I had a full UUID, I am simply going to use something like so:
$qb->andWhere('transactions.uuid = :uuid')->setParameter('uuid', Uuid::fromString($options['transactionUuid'])->getBytes());
But to search a partial uuid, I am looking to do something as follows:
$qb->expr()->like('transaction.uuid', Uuid:fromString(':search')->getBytes()),
But obviously the fromString requires a correctly formed uuid string as apposed to a partial.
I am not sure this is possible and perhaps is one of the downfalls of using bytes in the table as apposed to string.
The text was updated successfully, but these errors were encountered: