File tree 2 files changed +8
-6
lines changed 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -279,14 +279,12 @@ $person->withModId()->save();
279
279
280
280
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.
281
281
282
-
283
282
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.
284
283
285
284
` ` ` php
286
- protected $useModId = true ;
285
+ protected $withModId = true ;
287
286
` ` `
288
287
289
- If you wish to always include a ModId on a model, you can set ` protected $withModId = true ; ` on your model class.
290
288
291
289
# # Example FMModel Class
292
290
` ` ` php
Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ abstract class FMModel extends Model
65
65
*/
66
66
protected $ modId ;
67
67
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 ;
69
73
70
74
/**
71
75
* The "type" of the primary key ID. FileMaker uses UUID strings by default.
@@ -227,14 +231,14 @@ public function setModId($modId): void
227
231
public function withModId ($ include = true ): static
228
232
{
229
233
// remove any set ModId if the user wishes to remove it
230
- $ this ->useModId = $ include ;
234
+ $ this ->withModId = $ include ;
231
235
232
236
return $ this ;
233
237
}
234
238
235
239
public function usingModId (): bool
236
240
{
237
- return $ this ->useModId ;
241
+ return $ this ->withModId ;
238
242
}
239
243
240
244
public function getReadOnlyFields ()
You can’t perform that action at this time.
0 commit comments