[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) |
[eluser]mcnux[/eluser]
First off, thanks for the very clear, detailed reply. I've never received such good support with any other open source product. [quote author="OverZealous" date="1251397411"] Code: class List_item extends DataMapper{ [/quote] Yeah I tried that first off but it wasn't working - I just tried it again with my model identical to your example and was still having a problem with the FKs. I've now found the problem - it fails for count() but is fine for get(). If I'd have just tried doing a get() first I would have found the problem a lot earlier. Doh! $parentItem->sub_item->get(): Code: SELECT `list_items`.* $parentItem->sub_item->count(): Code: SELECT COUNT(*) AS `numrows` EDIT: also have the problem on delete when removing relationship: $parentItem->delete(): Code: UPDATE `list_items` SET `sub_item_id` = NULL WHERE `sub_item_id` = 1 Surely that's not me right? Please tell me it's not me! |
Welcome Guest, Not a member yet? Register Sign In |