eagerload on table.c.col == table.c.col

Issue #1612 resolved
Mike Bayer repo owner created an issue

i.e. the table with composite PK and a col==itself, like in test_relationships RelationTest2:

CREATE TABLE task (
"name" text NOT NULL,
asset text NOT NULL,
parent_asset text,
<more columns>
CONSTRAINT "task_PK" PRIMARY KEY (asset, name),
CONSTRAINT "task_parent_FK" FOREIGN KEY (parent_asset, "name")
     REFERENCES task (asset, "name") MATCH SIMPLE
     ON UPDATE CASCADE ON DELETE CASCADE);

I think what has to happen is the condition is detected in the PJ, and a new annotation is added to one side of name==name that somehow does the right thing in clause adaption - likely a flag passed to clause adaption only during the eagerload phase.

Comments (2)

  1. Log in to comment