user4092086 user4092086 - 1 year ago 188
TypeScript Question

FindOption vs QueryBuilder in typeorm

Is there any limitation with FindOption in typeorm?

Something that we can do with QueryBuilder but not with FindOption?

Because I'm trying to create a genericRepository and for my select queries It's good if I can send FindOption object from every where that I call my genericRepository

Answer Source

There are some special methods in query builder which you can use, but you would rarely use them. In most of case FindOption is enough for your queries, but I recommend to use QueryBuilder, because using it you will write more complex and readable queries more easily.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download