Skip to content

Commit

Permalink
DOC Warnings about searchable_fields content
Browse files Browse the repository at this point in the history
  • Loading branch information
sabina-talipova committed Aug 3, 2023
1 parent bd51d1f commit 0a187ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions en/02_Developer_Guides/00_Model/11_Scaffolding.md
Expand Up @@ -70,10 +70,13 @@ The `$searchable_fields` property uses a mixed array format that can be used to
system. The default is a set of array values listing the fields.

[info]
`$searchable_fields` will default to use the [`$summary_fields` config](#summary-fields) if not defined. This works fine unless
your `$summary_fields` config specifies fields that are not stored in the database.
`$searchable_fields` will default to use the [`$summary_fields` config](#summary-fields), excluding anything that isn't a database field (such as method calls) if not explicitly defined.
[/info]

[warning]
If you define a `searchable_fields` configuration, _do not_ specify fields that are not stored in the database (such as methods), as this will cause an error.
[/warning]

```php
use SilverStripe\ORM\DataObject;

Expand Down

0 comments on commit 0a187ea

Please sign in to comment.