notorm icon indicating copy to clipboard operation
notorm copied to clipboard

new inserted result does NOT have where and conditions

Open softwarevamp opened this issue 12 years ago • 1 comments

$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

softwarevamp avatar Feb 25 '14 10:02 softwarevamp

Can you try omitting 'categories_id' => null,?

vrana avatar Feb 25 '14 16:02 vrana