Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new inserted result does NOT have where and conditions #77

Open
softwarevamp opened this issue Feb 25, 2014 · 1 comment
Open

new inserted result does NOT have where and conditions #77

softwarevamp opened this issue Feb 25, 2014 · 1 comment

Comments

@softwarevamp
Copy link

$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

@vrana
Copy link
Owner

vrana commented Feb 25, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants