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

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

Open
zwickes opened this issue Nov 20, 2012 · 2 comments
Open

Comments

@zwickes
Copy link

zwickes commented Nov 20, 2012

//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.

@jimbojsb
Copy link
Collaborator

Can you provide a runnable snippet that reproduces this in isolation? I don't think this is an issue with Phactory.

@zwickes
Copy link
Author

zwickes commented Nov 21, 2012

You are right - looks like it was probably my code... Thanks. However, I have more questions about the proper usage. I think I am not doing this right. Can I direct questions here? Or somewhere else? Thanks!

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