You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/5. Virtual Fields.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -83,15 +83,17 @@ class Order extends \Tests\App\Record\Definition\Order
83
83
{
84
84
protected static array $virtualFields = [
85
85
// the OrderDetailChildren will be returned in order_detail_id order. Leave off the third array element to let SQL determine the order if you don't care.
By default, child records will be automatically deleted when the parent record is deleted. You can disable this functionality for a specific record class by setting the static property $deleteChildren to false, or using your own Children class.
92
+
91
93
### Usage
92
94
```php
93
95
$order = new \App\Record\Order(31);
94
-
foreach ($order->OrderDetailChildren as $orderDetail)
96
+
foreach ($order->orderDetailChildren as $orderDetail)
95
97
{
96
98
echo "Gross {$orderDetail->gross} for product {$orderDetail->product->product_name}\n";
* @param array<string, string[]> $parameters containing **\PHPFUI\ORM\Children::class** followed by the child table, then the optional parameters of an order by column and sort order (defaults to ASC).
27
+
* @param array<string, string> $parameters containing **\PHPFUI\ORM\Children::class** followed by the child table, then the optional parameters of an order by column and sort order (defaults to ASC).
return\preg_replace('/[^[a-zA-Z_][a-zA-Z0-9_.$@-]{0,63}$]/', '', $fieldName); // string invalid characters since we can't use a placeholder in order and group by
return\preg_replace('/[^[a-zA-Z_][a-zA-Z0-9_.$@-]{0,63}$]/', '', $fieldName); // string invalid characters since we can't use a placeholder in order and group by
0 commit comments