mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-197: OCI8 does handle CLOBS differently than all PDO drivers #244
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 6, 2009).
Jira issue originally created by user @beberlei:
OCI8 returns OCI-LOB objects instead of the clob directly (also for binary large objects) as described by the Underground Manual to PHP and Oracle.
http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf
To accompany for this behaviour we need to use the described methods to directly get access to strings:
And use temporary LOBs for update/insert:
@doctrinebot commented on GitHub (Dec 6, 2009):
Comment created by @beberlei:
Added test that fails on Oracle OCI into BasicFunctionalTest TestCase.
I think we should handle CLOBs and BLOBs differently.
a CLOB should be a string by default, however a BLOB on any platform should look like an OCI-LOB instance imho.
@doctrinebot commented on GitHub (Dec 6, 2009):
Comment created by @beberlei:
Hm, the simple addition of the OCI_RETURN_LOBS constant seemed to work. That easy? We'll see!
@doctrinebot commented on GitHub (Dec 6, 2009):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Dec 7, 2009):
Comment created by romanb:
The current solution is fine as a start. Its just that this setting also affects blobs.
This gets problematic whenever a clob/blob is very large, in which case its not really good to load it all at once. We probably need new types for this stuff.
both being represented by some kind of object that wraps the platform differences.
However, its not easy to propagate to the driver whetner to use OCI_RETURN_LOBS or not.
So I think the current behavior is fine as a start. There is nothing better and simpler that works right now.
@doctrinebot commented on GitHub (Dec 7, 2009):
Comment created by @beberlei:
PDO handles BLOB vs CLOB differently afaik, i can't tell for sure though. I think for BLOBs pdo returns a file pointer, CLOBs are returned as string.
Now how PDO recognizes the difference for example in the case of oracle is probably not configurable for the enduser.