Im looking to see if anyone can shed some light on a problem im having.
In my collection Y, I have a field called ADJU, which has stored in it, the serialised PHP array of MongoIDs.
One example field is
“a:1:{i:0;a:1:{s:4:\”MBID\”;C:7:\”MongoId\”:24:{4f2c5b9bb9a21d5010000005}}}”
The parameter im passing in is
“4f2c5b9bb9a21d5010000005”
public function read_adjudicating(MongoID $account_identifier){
$regexObj = new MongoRegex("/".$account_identifier->__toString()."/");
var_dump($regexObj);
$result = $this->connection->X->Y->find(array('ADJU' => $regexObj), array('__id'));
var_dump($result);
Can anyone work out why it is giving me 0 records, when as you can see, one example definately has it?
Thanks for your help!
Well, it’s not the query:
Which means the php code you’ve written doesn’t correspond to the query you expect, or the data isn’t in the format you expect.
Rather than investigate why though – you’d be better off IMO either updating the script you used to import the data from mysql to deserialize before inserting to mongo – or write a (php) script to read the already-serialized-in-mongo data, deserialize it – and save it again.