Update data prefix (#181)

`data.` is not working for me as a prefix. I had to use `data->`. This
is consistent with the Laravel docs.

Not sure if I'm missing something?

https://laravel.com/docs/9.x/queries#json-where-clauses
This commit is contained in:
Chris Chapman 2022-07-20 13:19:11 -07:00 committed by GitHub
parent d67116163d
commit 53f9125946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,12 +99,12 @@ public static function getDataColumn(): string
Note that querying data inside the `data` column with `where()` will require that you do for example:
```php
where('data.foo', 'bar')
where('data->foo', 'bar')
```
The data column is encoded/decoded only on model retrieval and saving.
Also a good rule of thumb is that when you need to query the data with `WHERE` clauses, it should have a dedicated column. This will improve performance and you won't have to think about the `data.` prefixing.
Also a good rule of thumb is that when you need to query the data with `WHERE` clauses, it should have a dedicated column. This will improve performance and you won't have to think about the `data->` prefixing.
## Running commands in the tenant context {#running-commands-in-the-tenant-context}