laravel-oci8
laravel-oci8 copied to clipboard
ORA-01722 Oci8Exception(code: 1722)
Summary of problem or feature request
I'm try to insert a blob in a table, the table has all columns as VARCHAR and it uses 2 composite keys which both are VARCHAR, and the model has increting as false and the keyType as string. When inserting or updating ORA-01722 get thrown the problem is in the last key binding is the SQL RETERNING statement that gives the primaryKey the value of 0. I have read the oci8 code I seen that a variable sequence gets the name of the primaryKey that is define in the model found no way to override it was hoping to be a way to remove the returning statement that has the primary key and it bind
Code snippet of problem
System details
- Windows 11
- 8.1
- 8
- 8
I end up updating the saveLob method in the \yajra\laravel-oci8\src\Oci8\Query\Processors\OracleProcessor.php guess it set the id to be always 0 wich look pretty weird as the id should if not most match the row id but changing PDO::PARAM_INT to PDO::PARAM_STR in the blindParam did the trick, I still don't agree with the solution since I needed to modify the vendor code and also the fact that the id is set on 0 all the time, should be a way to change the id and its type Looks very wrong!.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.