gid-oss / dataui-nestjs-crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
130 stars 31 forks source link

Filter by parent model id is not working #63

Open gersonfa opened 4 months ago

gersonfa commented 4 months ago

I just migrated from @nestjsx/crud and I'm getting this issue:

I have this model

@Entity()
export class StorageRegister extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    type: string;

    @Column({ type: 'bigint', nullable: true })
    date: number;

    @Column()
    user: number;

    @Column({ nullable: true })
    responsible: string;

    @ManyToOne(() => WorkOrderModel, wo => wo.registers, { onDelete: 'CASCADE' })
    order: WorkOrderModel;
}

I also have this query, where the response should be all the storage-register items related to a single work-order model. /storage-register?filter=order||eq||${this.orderId}

However this query is no longer working, and I'm getting this error: QueryFailedError: column StorageRegister.orderId.id does not exist

These are the versions I'm using:

"typeorm": "^0.3.20",
"@dataui/crud": "5.3.4",
"@dataui/crud-typeorm": "5.3.4",
"typescript": "5.5.4"

This code was working before, prior the migration. Thanks for your help.