﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36030	Rendering decimal to SQL is incoherent and leads to bugs. It relays on str formating not type.	Bartłomiej Nowak		"When I am using Decimal at Python level, I expect to use numeric type on database level. But it seems to depend on string formatting of decimal itself instead of type of object. 

**See examples:**

`Decimal(1000.0)` --> will render as `1000` at query and will be **INT** on db level.
`Decimal(1000)`  --> will render as `1000` at query and will be **INT** on db level.
`Decimal(""1000.0"")` -> will render as `1000,0` at query and will be **NUMERIC** on db level.
`models.Value(1000.0, output_field=DecimalField())` ->  will render as `1000` at query and will be **INT** on db level.
`models.Value(1000.0)` (no decimal provided as above) -> will render as `1000,0` at query and will be **NUMERIC** on db level.

It leads to bugs, cuz at DB LVL,  INT / INT is also INT (2/3 = 0), and I doubt anyone who provides decimal there, excepts that behavior.

"	Bug	new	Database layer (models, ORM)	5.1	Normal			Bartłomiej Nowak	Unreviewed	0	0	0	0	0	0
