prisma-client-php 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -843,7 +843,11 @@ final class PPHPUtility
843
843
  }
844
844
 
845
845
  if (empty($relatedInstanceField['relationFromFields']) && empty($relatedInstanceField['relationToFields'])) {
846
- $whereConditions[$toField] = $singleRecord[$toField];
846
+ if ($relatedInstanceField['relationName'] === $relatedField['relationName'] && array_key_exists($fromField, $singleRecord)) {
847
+ $whereConditions[$toField] = $singleRecord[$fromField];
848
+ } else {
849
+ $whereConditions[$toField] = $singleRecord[$toField];
850
+ }
847
851
  } elseif ($relatedInstanceField['isList']) {
848
852
  $whereConditions[$toField] = $singleRecord[$fromField];
849
853
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prisma-client-php",
3
3
  "description": "Prisma Client PHP is an auto-generated query builder that enables type-safe database access in PHP.",
4
- "version": "0.0.10",
4
+ "version": "0.0.12",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "scripts": {