peili
(Leet)
1
Hey there,
for example: My AR attribute "price" expects comma representation of numbers (9,95 not 9,95).
Is there any way to define that in the ActiveRecord? So any input and output concerning " price" it already formated.
(Of course in the MYSQL-Table I can not use commas)
Best regards,
Peili
eclectus
(Shai)
2
just override beforeSave and afterFind in your model, and you can have any transformation you want.
Tropi
(Daniel Lang)
3
In some cases there also exist behaviors in the extension database, like i18n-datetime-behavior which might save you even more time.