Filtering does not work on embedded fields
See original GitHub issueIf I try to filter query by field in embedding I receive 500 error.
Request /farms?filter=customerStatus.feedAccountNumber||$eq||8999996
Error
[Nest] 52408 - 03/15/2021, 12:44:12 PM [ExceptionsHandler] ER_BAD_FIELD_ERROR: Unknown column 'customerStatus.feedAccountNumber' in 'where clause' +114696ms QueryFailedError: ER_BAD_FIELD_ERROR: Unknown column 'customerStatus.feedAccountNumber' in 'where clause'
Farm Class
@Entity('farms')
export class Farm {
@PrimaryGeneratedColumn()
id: number;
@Column()
name: string;
@Column(() => CustomerInfo)
customerStatus: CustomerInfo;
@CreateDateColumn()
createdAt: Date;
@UpdateDateColumn()
updatedAt: Date;
}
CustomerInfo class
export class CustomerInfo {
@Column({
type: 'enum',
enum: FeedCustomerStatus,
default: FeedCustomerStatus.INACTIVE,
})
feedStatus?: FeedCustomerStatus;
@Column({ nullable: true })
feedAccountNumber?: string;
@Column({
type: 'enum',
enum: PulletCustomerStatus,
default: PulletCustomerStatus.INACTIVE,
})
pulletStatus: PulletCustomerStatus;
@Column({ nullable: true })
pulletAccountNumber?: string;
@Column({ nullable: true })
accountName?: string;
}
I tried join, alias, nothing helped
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
Filtering on nested objects does not work · Issue #3434 - GitHub
I just faced the same issue in the user interface. In the sidebar if you click Add filter then select a non relation...
Read more >Filters don't work in Non-nested aggregation on nested fields ...
When running non-nested aggregation, the nested context is lost and the filters have no effect on the aggregation buckets.
Read more >Solved: Filtering Power BI Embedded Report Not Working
Solved: Hello, I'm trying to filter an embedded report by "Sort field" and it doesn't seem to be working. The fields of the...
Read more >Release and location fields will not appear in the embedded ...
In the embedded filter choose "keyword" and then type release: ... This will work with any normal field (unfortunately not with location.
Read more >Filtering on nested fields - Kibana - Discuss the Elastic Stack
I have a nested field called 'metadata' in my index with various fields inside. For some reason filtering in Kibana does not work....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same problem here, is there any other solutions? it seems ugly to use a BeforeInsert and duplicate fields 😦