notorm
notorm copied to clipboard
new inserted result does NOT have where and conditions
$inserted = $db->categories->insert(array( 'categories_id' => null, 'categories_image' => $json->image, 'parent_id' => $json->parent ? $json->parent->id : 0, 'sort_order' => $json->sort_order, 'date_added' => new DateTime(), 'last_modified' => null ));
$fetched = $db->categories[$inserted['categories_id']];
$inserted's result has no where and conditions but $fetched's has
this affects subsequent referencing table results: $inserted->categories_description(); // empty $fetched->categories_description(); //has results
Can you try omitting 'categories_id' => null,?