Ticket #1099 (closed defect: fixed)

Opened 13 months ago

Last modified 13 months ago

Column Aggregation Inheritance breaks NestedSet

Reported by: zomg Owned by: romanb
Priority: minor Milestone: 0.11.0
Component: NestedSet Version: 0.11.0
Severity: Keywords: NestedSet, Column Aggregation Inheritance
Cc: Has Test:
Status: Has Patch:

Description

Using NestedSet? with Column Aggregation Inheritance does not work correctly.

Take a Page model which acts as NestedSet? and has subclass SubPage?. Now, query the database for some SubPage? objects, and try accessing their parent nodes. This will always produce a false result, even if the SubPage? had a parent in the NestedSet?.

The attached patch fixes the issue. I have tested it in one of the projects I'm working on, and it has worked OK.

Attachments

Node.patch (0.8 KB) - added by zomg 13 months ago.
Patch for Doctrine/Node.php
1099TestCase.php (1.4 KB) - added by zomg 13 months ago.
Test case

Change History

Changed 13 months ago by zomg

Patch for Doctrine/Node.php

Changed 13 months ago by zomg

  • owner changed from jwage to romanb
  • component changed from Attributes to NestedSet

Changed 13 months ago by zomg

  • summary changed from NestedSet breaks Column Aggregation Inheritance to Column Aggregation Inheritance breaks NestedSet

Changed 13 months ago by zomg

Test case

Changed 13 months ago by zomg

I've added a testcase for the ticket, as it seems the old code in the Node.php file was supposed to make CAI work but it didn't.

Changed 13 months ago by romanb

  • milestone changed from 0.11.3 to 0.11.0

Changed 13 months ago by romanb

  • status changed from new to closed
  • resolution set to fixed

(In [4460]) Fixed #1099.

Note: See TracTickets for help on using tickets.