Open tim-kuteev opened 3 years ago
When using join and trying to access column of join table in @CrudAuth filter as follows:
@Crud({ model: { type: UserThings, }, routes: { only: [ 'getOneBase', ], }, query: { join: { user: { eager: true, }, }, }, }) @CrudAuth({ property: 'user', filter: ({ id }) => ({ 'user.id': id, }), })
the following line will create SQL parameter alias with . in it like :andWhereuser.id43253...
.
:andWhereuser.id43253...
https://github.com/nestjsx/crud/blob/bbea082a3f0fc7c1be42a79164f41b8449ad2251/packages/crud-typeorm/src/typeorm-crud.service.ts#L777
Oracle doesn't like that and throws an error of incorrect identifier.
When using join and trying to access column of join table in @CrudAuth filter as follows:
the following line will create SQL parameter alias with
.
in it like:andWhereuser.id43253...
https://github.com/nestjsx/crud/blob/bbea082a3f0fc7c1be42a79164f41b8449ad2251/packages/crud-typeorm/src/typeorm-crud.service.ts#L777
Oracle doesn't like that and throws an error of incorrect identifier.