Skip to content

FindOne using integer property fails - but the same works using string #25

@zwickes

Description

@zwickes

//Given:
Phactory::define('keys', array('Xid' => 9999999));
Phactory::create('keys');

// This FAILS to find the record:
...
$keysCollection = $udb->selectCollection('keys');
$keyResults = $keysCollection->findOne(array('Xid' => 9999999));

// However - if we simply change the data (stored and searched) to STRING it works!
Phactory::define('keys', array('Xid' => "9999999"));
Phactory::create('keys');
...
$keysCollection = $udb->selectCollection('keys');
$keyResults = $keysCollection->findOne(array('Xid' => "9999999"));

As you can see the number is small enough not to cause any potential Int64 strangeness.
Clearly a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions