Skip to content

Commit 3cca36f

Browse files
committed
Fixed improperly named property name, fixed documentation conflicts
1 parent fce99ed commit 3cca36f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,12 @@ $person->withModId()->save();
279279
280280
The modId is automatically set on the model object when you retrieve a record from FileMaker, so you don't need to set it manually.
281281
282-
283282
If you always want the ModId to be included when saving a record, you can set the `$withModId` property to true on your model class.
284283
285284
```php
286-
protected $useModId = true;
285+
protected $withModId = true;
287286
```
288287
289-
If you wish to always include a ModId on a model, you can set `protected $withModId = true;` on your model class.
290288
291289
## Example FMModel Class
292290
```php

src/Database/Eloquent/FMModel.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ abstract class FMModel extends Model
6565
*/
6666
protected $modId;
6767

68-
protected $useModId = false;
68+
/**
69+
* A flag to determine if the last retrieved ModId for the record should be sent when editing a record. The Data
70+
* API will return an error if the record has been modified and current ModId does not match the one being sent.
71+
*/
72+
protected $withModId = false;
6973

7074
/**
7175
* The "type" of the primary key ID. FileMaker uses UUID strings by default.
@@ -227,14 +231,14 @@ public function setModId($modId): void
227231
public function withModId($include = true): static
228232
{
229233
// remove any set ModId if the user wishes to remove it
230-
$this->useModId = $include;
234+
$this->withModId = $include;
231235

232236
return $this;
233237
}
234238

235239
public function usingModId(): bool
236240
{
237-
return $this->useModId;
241+
return $this->withModId;
238242
}
239243

240244
public function getReadOnlyFields()

0 commit comments

Comments
 (0)