0

I just wondering how can I apply offset and limit query parameters in case of use one.toManies API with several left joins?

My sample DSL is:

withSQL {
        select.from(CustomerTable as cust)
          .leftJoin(SocialNetworkTable as sn).on(cust.id, sn.customerId)
          .leftJoin(MailingTable as ml).on(cust.id, ml.customerId)
}.one(CustomerTable(cust)).toManies(...)

So I want to paginate over parent CustomerTable.

Do you have any best practices to doing this?

ybondar
  • 399
  • 2
  • 18

1 Answers1

0

Using Skinny ORM's pagination feature would be better (or implementing your own one...).

http://skinny-framework.org/documentation/orm.html

Kazuhiro Sera
  • 1,822
  • 12
  • 15