Best way to query object with array of pointers

I am trying to find out what the best way to go about querying an object that has an array of pointers to another object.

Using the include works with a one-to-one relationship but not with one-to-many.

I have an orders object that has a property called cartItems which stores an array of pointers. I am trying to load orders including their corresponding cartItems in a single query.

is this possible?

The include should work also with arrays. Have you tried? See this test case: