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
Fix/repeating aliases in nested relations #282
Fix/repeating aliases in nested relations #282
Conversation
I had thought long time about adding a new property to JoinOption like @Crud({
// ...
query: {
join: {
category: {},
'category.image': {},
tags: {},
'tags.image': {
alias: 'image2'
}
}
}
})
class MyController {
// ...
} What do you think about this? |
I will add commit to fix coverage test in 1 day. |
@@ -207,6 +207,34 @@ export class TypeOrmCrudService<T> extends CrudService<T> { | |||
// select fields | |||
builder.select(select); | |||
|
|||
// set joins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this method, I do not understand why the filters were added before joins? Is there a reason for this? My reason to change ordering is that some filters would do not valid until relation do not add to entityRelationsHash
.
great work, @VLZH ! |
Closing this in favor #287 |
To fix this issue: #55.