-
-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too many nested levels!
error
#87
Comments
Actually, we need to ask @Diluka about that. He's more efficient with this part of the lib because it was his feature. |
@roland-chernov-akvelon |
@Diluka Thanks for the quick response. So in other words, if I want to filter by Unfortunately, it fails for me with the I can try to implement an integration test if needed. |
@roland-chernov-akvelon Do you remember to join? |
Same error for me. jobs?join=address&filter=address.id||eq||99&join=address.state&filter=state.id||eq||10 results in:
|
@Diluka Sure, API returns all joined results but fails to filter. |
crud/src/typeorm/repository-service.class.ts Lines 379 to 381 in e71906d
This is a bug. There shall check |
I can't reproduce this issue on |
@Diluka Please check master...roland-chernov-akvelon:issue-87 , I hope I set up it correctly 🤔 To reproduce this issue:
Please let me know if you have any questions. |
We have dug this issue deep and figured out that we can use Broken
Working
|
So what that means is that we cannot filter nested relationships by something other than id? |
@roland-chernov-akvelon @zMotivat0r but one test failed in ci environment and ci reports ok. is this normal? |
@Diluka yeah, that's really strange. I'll try to see what happens here today |
@SinPP It was true for v3.x.x but I haven't tested v4.x.x yet |
@Diluka The error occurs when there is no direct relation between Please see this commit: roland-chernov@a32bd0b |
Hi guys! I have the same problem as rolan-chernov-akvelon. My entities : @PrimaryColumn('varchar', { length: 20, unique: true })
@IsString()
id!: string;
@OneToMany(type => Company, comp=> comp.user, { cascade: false })
companies!: Company[]; Company : @PrimaryColumn('varchar', { length: 20, unique: true })
@IsString()
code!: string;
@Column({ nullable: false })
@IsString()
name!: string;
@OneToMany(type => Project, project=> project.company, { cascade: false })
projects!: Project[];
@ManyToOne(type => User, user=> user.companies, { cascade: false, eager: false, nullable: false })
@JoinColumn({ name: 'id_user' })
user!: User; Project: @PrimaryColumn('varchar', { nullable: false })
code!: string;
@ManyToOne(type => Company, comp=> comp.projects, { primary: true, nullable: false, cascade: false })
@JoinColumn({ name: 'code_company', referencedColumnName: 'code' })
company!: Company; Thx you for your help. |
there is still a bug, if nested property more 2 levels this loop will add more than 2 levels' path crud/packages/crud-typeorm/src/typeorm-crud.service.ts Lines 490 to 494 in 77bb83a
and here will pass it to query builder directly and raise an error
|
Hi everyone,
Could you help with the filtering on nested fields? It doesn't support nesting more than 2 levels deep, I wonder what is the reason for this limit 🤔
crud/src/typeorm/repository-service.class.ts
Lines 386 to 391 in a6a5f3d
Could you clarify if there are any plans to make this limit customizable?
Thanks,
Roland
The text was updated successfully, but these errors were encountered: