mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3255: findOneBy return null even sql returns result #4028
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Aug 15, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user nexik:
I have some nasty tables from some engineer project.
In tables there is temperature column with type varchar(255). Values in this column are from "0.000" to "99.000"
I try to get one object with findOneBy method but always get null
$repository->findOneBy(['temp' => 43]); will return null
$repository->findOneBy(['temp' => '43.000']) will return proper object
both option generate sql that return object (tested with symfony2 profiler an mysql server)
currently I'm using number_format function as workaround