Fix find tool filters by mapping many-to-one relations to fieldId (#15716)

**Root Cause**  
Many-to-one relation filters were being exposed under the relation name
(e.g., `company`) instead of the corresponding foreign-key attribute
(e.g., `companyId`).

**Change**  
- Detect many-to-one relation metadata and remap those filter keys to
`<fieldName>Id`.
- Removed some unused code unrelated to this fix.
This commit is contained in:
Abdul Rahman
2025-11-08 19:02:06 +05:30
committed by GitHub
parent 4c4eeef5ae
commit 06d8c8c76a
9 changed files with 18 additions and 29 deletions
@@ -20,7 +20,7 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent
import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator';
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
export interface ChatRequest {
interface ChatRequest {
messages: ModelMessage[];
temperature?: number;
maxOutputTokens?: number;