Skip to content

Function Fillable

saving json fields

typescript
const model = await FedacoTestWithJSON.createQuery().create({
  json: {
    x: 0
  }
});
typescript
model.Fillable(['json->y', 'json->a->b']);
await model.update({
  'json->y': '1'
});
ReferenceLooks LikeValue
model.jsonmatch({
'x': 0,
'y': '1'
});
ReferenceLooks LikeValue
'json->a->b' in model.toArray()exactly matchfalse
model.jsonmatch({
  'x': 0,
  'y': '1',
  'a': {
    'b': '3'
}
});`

see also prerequisites

Released under the MIT License.