mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3255: findOneBy return null even sql returns result #4030
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
@doctrinebot commented on GitHub (Aug 18, 2014):
Comment created by @ocramius:
This is a type-conversion issue that depends on how you are dealing with your data. The ORM has nothing to do with it.
@doctrinebot commented on GitHub (Aug 18, 2014):
Issue was closed with resolution "Invalid"