Groups
Sign in
Groups
Phalcon PHP Framework
Conversations
About
Send feedback
Help
ODM in 0.8.0, can't put conditions in findFirst() or find()
101 views
Skip to first unread message
kiang
unread,
Jan 31, 2013, 1:43:17 AM
1/31/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
$organization = Organizations::findFirst() return one object. But when I trying to have conditions inside like
$organization = Organizations::findFirst(array(array('tax_id' => $taxId)));
It just can't find anything.
Query in mongo console could get correct object:
db.organizations.findOne({tax_id: "$taxId"})
* also tested in 0.9.0 beta.
---
kiang
Vitaly Alyokhin
unread,
Jan 31, 2013, 2:38:59 AM
1/31/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
why double array? Organizations::findFirst(array(array
findFirst(array('key = :key:'))
2013/1/31 kiang <
kia...@gmail.com
>:
> --
> You received this message because you are subscribed to the Google Groups
> "Phalcon PHP Framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
phalcon+u...@googlegroups.com
.
> To post to this group, send email to
pha...@googlegroups.com
.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/phalcon/-/swMacq3HZjkJ
.
> For more options, visit
https://groups.google.com/groups/opt_out
.
>
>
--
С уважением, Виталий.
Vitaly Alyokhin
unread,
Jan 31, 2013, 2:40:29 AM
1/31/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
sorry
findFirst(array('key = :key:'), 'bind' => array('key' => 'anykey'))
2013/1/31 Vitaly Alyokhin <
228...@gmail.com
>:
--
С уважением, Виталий.
kiang
unread,
Jan 31, 2013, 7:42:46 AM
1/31/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pha...@googlegroups.com
Just found the solution and posted here:
http://forum.phalconphp.com/discussion/23/odm-in-0-8-0-can-t-put-conditions-in-findfirst-or-find-
---
kiang
Reply all
Reply to author
Forward
0 new messages