Comments (5)
Is the value returned from Postgres a resource
?
from uuid-doctrine.
I cannot tell with certainty if that is the case, I will check or make a poc for the issue. Sorry for the delayed reply, I have been traveling.
from uuid-doctrine.
Updates 😄 , finally.
So I tried to reproduce my own report and I was failing at it. Most of the blame is on me, because while trying to debug this I changed so many things to "make it work", that I was convinced that my original report above reflected the truth.
I followed the README of this project and just adapted to PSQL if necessary. Originally the project was using uuid_binary
. The result was what I have mentioned above. At some point I changed from uuid_binary
to uuid
and it still did not work. Unbeknownst to me at that time was that, of course it did not work, I had old data in my DB.
The is_resource
did handle my now mixed data DB.
This seems to be a specific issue when you combine a DB such as posgre and uuid_binary
. I made a little POC project here and here you can see the output of a small workflow, step: Proof maybe?.
This is kind of a bug? I think README can be updated to make it more clear which type to use with which which platform, instead of having a comment hidden in a closed issue from 2018.
Additionally the UuidBinary
could also do a platform check and throw an incompatible exception?
public function convertToPHPValue($value, AbstractPlatform $platform): ?UuidInterface
{
if ($platform instanceof PostgreSQLPlatform) {
throw new IncompatibleTypeAndPlatformException;
}
// ...
}
Happy to help with either 👍
from uuid-doctrine.
I faced the same issue triggering the following error:
The given entity of type [...] ([...]@999) has no identity/no id values set. It cannot be added to the identity map.
I'm on PHP 8.2.12 with PostgreSQL 15.3
Adding the resource handling fixed my issue:
if (is_resource($value)) {
$value = stream_get_contents($value);
}
I am in favor of introducing resource handling for PostgreSQL and have submitted a PR #229.
from uuid-doctrine.
I created #230 to add clarify optimal use with PostgreSQL.
from uuid-doctrine.
Related Issues (20)
- uuid_binary_ordered_time not working with IN expression HOT 9
- Doctrine 3 compatibility HOT 1
- Imcompatible with the latest Doctrine 2.10 HOT 2
- doctrine.dbal.default_connection is set to 'default' and cannot be changed anymore HOT 2
- Deprecation notice after updating from Symfony 5.3 to 5.4 HOT 2
- Tag new release HOT 1
- Supportfor typed property. HOT 4
- Support other types of `EntityManagerInterface` too HOT 2
- Fetching metadata from an entity using the custom strategy is throwing an error. HOT 2
- Node of UUID is 0 HOT 1
- Additional usage of UUID v6/v7 for UuidBinaryOrderedTimeType HOT 7
- Converting my entities ids to uuids
- Tag a new release HOT 1
- Fetching association throws "Unknown parameter type, 116 given" exception HOT 6
- Object of class Ramsey\Uuid\Lazy\LazyUuidFromString could not be converted to int HOT 1
- Doctrine/dbal v4 is out!
- Symfony/Doctrine fail to find an entity based off of its binary UUID HOT 3
- Cannot bind uuid_binary type to Doctrine's QueryBuilder
- OneToMany with fetch=EAGER fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uuid-doctrine.