Symfony, doctrine, yaml and floating point

I’ve spend some time with Google, because I needed to know howto setup number of digits behind the floating point. I was unable to find it in documentation (maybe I’ve just mislooked) Anyway, solution in YAML looks like this, possibly someone will find it usefull:

my_anything: { type: float(8), scale: 5 }

It’s all about keyword scale. Value in database will look like 123.45678.

Můžete zanechat komentář, nebo trackback z vaší stránky.

Zanechat komentář

Odebírat RSS Feed Sledujte mě na Twitteru.