Hello,
I have the following 3 tables:
Event
id (PK)
plan_id (FK to Plan)
Plan
id (PK)
name
PlanDetails
id (PK)
plan_id (FK to Plans)
some_info
I want to query an event by ID and expand the plan and PlanDetails associated with the event. So I do:
Event::QueryArray(
QQ::Equal(QQN::Event->Id, 1),
QQ::Clause(
QQ::Expand(QQN::Event->Plan),
QQ::ExpandAsArray(QQN::Event->Plan->PlanDetailsAsPlan)
)
The query that is produced is correct and returns 2 records because there are 2 details. But resulting object has only one detail populated inside Plan's __objPlanDetailsAsPlanArray.
I have tried removing the QQ::Expand(QQN::Event->Plan) clause and that has no effect.
(I am using QueryArray because QuerySingle populates __objPlanDetailsAsPlan. I saw this is a known bug that has a patch for it. But this does not seem to be related.)
When i query Plan directly and ExpandAsArray on PlanDetailsAsPlan this works correctly and i get 2 PlanDetails.
I am using QCodo 0.4.10
Thanks,
Brocha