Skip to content

Commit

Permalink
54. Fixes eager loading issue
Browse files Browse the repository at this point in the history
Prevents the ID field from being trimmed during hydration to resolve problems with eager loading in the DiscountCard model.
  • Loading branch information
dmitrakovich committed Dec 1, 2024
1 parent 628b172 commit 2674c83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/Models/OneC/DiscountCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@ class DiscountCard extends AbstractOneCModel
protected $casts = [
'SP3970' => 'date',
];

/**
* Array of fields that should not be trimmed during hydration
*/
public array $doNotHydrate = ['ID'];
}

0 comments on commit 2674c83

Please sign in to comment.