JayData.org

How to set default values in JayData

Author: Robert Bonay February 21st, 2013

, , ,


Do you want to reduce or simplify your code by adding default values to your objects? Since JayData 1.2.7 you can do it both with $data.define() and $data.Entity.extend().

Setting default values with $data.define()

Setting default values with $data.Entity.extend()

Avoiding default values

In case you created a type with default values and don’t want the default value to be set in a particular case, you can override the default behavior:


, , ,