mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3215: wrong quotation #3983
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 (Jul 16, 2014).
Originally assigned to: @ostrolucky on GitHub.
Jira issue originally created by user revrev:
when doctrine build query´s, for example when you doing
following queries are generated (test_id is integer in mysql):
Is this right?
For me the right query would be:
as in http://dev.mysql.com/doc/refman/5.5/en/type-conversion.html
6 will be converted to float, this can be an issue, or?
Comparisons that use floating-point numbers (or values that are converted to floating-point numbers) are approximate because such numbers are inexact. This might lead to results that appear inconsistent:
this also happens in dql sometimes, why doctrine does this not automatic right due to description in the entities?
@doctrinebot commented on GitHub (Jul 16, 2014):
Comment created by @ocramius:
Could you please convert this to a failing test case? Doctrine doesn't quote integers as strings by default.
@doctrinebot commented on GitHub (Jul 16, 2014):
Comment created by revrev:
i try to describe what i have done
i have an Entity with:
when i now clear the Data
following query is created
DELETE FROM vertrag_messen where messe_id = '6'
Should here not set the value 6 as integer (param_int) (
DELETE FROM test vertrag_messen where messe_id = 6) that mysql doesn´t have to cast the value? (http://dev.mysql.com/doc/refman/5.5/en/type-conversion.html) or is this not an problem?@doctrinebot commented on GitHub (Jul 16, 2014):
Comment created by @ocramius:
is
messe_idin your entity an integer or a string at the moment in time when that query is being executed?@doctrinebot commented on GitHub (Jul 16, 2014):
Comment created by revrev:
the value comes automatic
$entitity = $em->getRepository('Base\Entities\Vertrag')>find(intval($data["id"]));
i don´t set messe_id here
@doctrinebot commented on GitHub (Jul 16, 2014):
Comment created by @ocramius:
Can you
var_dumptheBase\Entities\Messeinstance?@doctrinebot commented on GitHub (Jul 16, 2014):
Comment created by revrev:
{quote}
object(stdClass)#1014 (64) {
["CLASS"]=>
string(24) "Base\Entities\Vertrag"
["id"]=>
int(6)
[„vertrag_messen"]=>
array(1) {
[0]=>
string(20) "Base\Entities\Messen"
}
["erstellungsdatum"]=>
object(stdClass)#1210 (3) {
["CLASS"]=>
string(8) "DateTime"
["date"]=>
string(25) "2013-09-28T00:00:0002:00"
["timezone"]=>
string(13) "Europe/Berlin"
}
["zeitraumvon"]=>
NULL
["zeitraumbis"]=>
NULL
["jahr"]=>
int(2014)
["created"]=>
object(stdClass)#1178 (3) {
["CLASS"]=>
string(8) "DateTime"
["date"]=>
string(25) "2013-09-28T19:05:2802:00"
["timezone"]=>
string(13) "Europe/Berlin"
}
["updated"]=>
object(stdClass)#1177 (3) {
["CLASS"]=>
string(8) "DateTime"
["date"]=>
string(25) "2014-07-16T17:18:10+02:00"
["timezone"]=>
string(13) "Europe/Berlin"
}
["uuid"]=>
string(36) "52470c58-4288-45eb-b75f-0c41c0a81437"
}
{quote}
@doctrinebot commented on GitHub (Jul 17, 2014):
Comment created by @ocramius:
yeah, integer identifier there.
Could you verify if the problem also comes up with current master? I think this issue is related with another one that was fixed some months ago in 2.5.x-dev
@doctrinebot commented on GitHub (Jan 20, 2015):
Comment created by thegh0st:
@Marco Pivetta:
I was affected by exact the same issue. Even when running git master at the beginning of last week, it was still broken.
Today I retestet. Luckily your latest commits (from beginning with:
445798ed46) to the BasicEntityPersister seemed fixed it.@revrev:
Could you please retest your example? This bug might be fixed. Thx.
@ostrolucky commented on GitHub (Aug 7, 2018):
Apparently resolved in 2.5.x-dev