I am using Aqueudct ORM with data models like so:
A
| (one-one)
B
/ | \ (all many-one)
C C C
and my Tables look like so:
class _A {
B b;
}
class _B {
@Relate(#c1Ref)
C c1;
@Relate(#c2Ref)
C c2;
@Relate(#c3Ref)
C c3;
}
class _C {
ManagedSet<B> c1Ref;
ManagedSet<B> c2Ref;
ManagedSet<B> c3Ref;
}
I want to write a query to fetch big fat A
, but I can't figure it out.
So far, I have:
final query = Query<A>(context)
..join(object: (a) => a.b)
//Note the non-cascading dot
.join(object: (b) => b.c1);
This gives me A
with B
but with only c1
. How do I write a query such that I get c2
and c3
as well?