Skip to content

How to add relations buried in an embedded entity? #831

Answered by ppetzold
pedramardakani asked this question in Q&A
Discussion options

You must be logged in to vote

umm.. embedded entities don't need any relation definition - see https://github.com/ppetzold/nestjs-paginate/blob/master/src/paginate.spec.ts#L1235

both notations relations: ['quantity.inspector'] and relations: { quantity: { inspector: true } } perform actual table joins, that's why you getting the error above.

Your case where an embedded entity holds another relation is simply an edge case where this lib has no coverage yet - and hence the implementation didn't consider this.

You are welcome to submit a bug fix :)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pedramardakani
Comment options

Answer selected by ppetzold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants