[Apps] Fix - app-synced object should be searchable (#19206)
## Summary - **Make app-synced objects searchable**: `isSearchable` was hardcoded to `false` and the `searchVector` field was missing the `GENERATED ALWAYS AS (...)` expression, causing all records to have a `NULL` search vector and be excluded from search results. Fixed by defaulting `isSearchable` to `true` (configurable via the object manifest), computing the `asExpression` from the label identifier field, and allowing the update-field-action-handler to handle the `null` → defined `asExpression` transition. - **Make `isSearchable` updatable on an object**: The property had `toCompare: false` in the entity properties configuration, so updates via the API were silently ignored and never persisted. Fixed by setting `toCompare: true`.
This commit is contained in:
+1
@@ -35,6 +35,7 @@ type Assertions = [
|
||||
| 'labelSingular'
|
||||
| 'labelPlural'
|
||||
| 'labelIdentifierFieldMetadataUniversalIdentifier'
|
||||
| 'isSearchable'
|
||||
>
|
||||
>,
|
||||
];
|
||||
|
||||
+2
-3
@@ -266,9 +266,8 @@ export class UpdateFieldActionHandlerService extends WorkspaceMigrationRunnerAct
|
||||
|
||||
if (
|
||||
isDefined(toSettings?.asExpression) &&
|
||||
isDefined(fromSettings?.asExpression) &&
|
||||
(toSettings.asExpression !== fromSettings.asExpression ||
|
||||
toSettings.generatedType !== fromSettings.generatedType)
|
||||
(toSettings.asExpression !== fromSettings?.asExpression ||
|
||||
toSettings.generatedType !== fromSettings?.generatedType)
|
||||
) {
|
||||
await this.workspaceSchemaManagerService.columnManager.dropColumns({
|
||||
queryRunner,
|
||||
|
||||
Reference in New Issue
Block a user