Reputation: 1
I use Sonata Admin Bundle in Symfony2 and have a custom filter. In database, column is float (cannot change it). If you type 1333.33 there will be no result.
One solution is to use CAST:
CAST( o.price AS DECIMAL) = CAST( 399.99 AS DECIMAL)
Query is working just fine in SQL but Doctrine throws an error. So my question is how can use CAST in Doctrine or another reliable solution?
Upvotes: 0
Views: 2366