Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Overview

Value of this field is a decimal number.

Decimal values range and precision

Remember to include Unscaled Value Validator and Scale Validator in each decimal number field.
With them you could get clear message about unsuccessful validation instead of internal error when you try to save too big (or too precise) value.

Above validators also changes database's scale & precision attributes in column definition.

Common Attributes

name

type

required

default value

description

name

string

yes

none

Name  of the field, must be unique in this model scope.

readonly

boolean

no

false

If true this field cannot be change by user.

required

boolean

no

false

If true this field will be required (validator and "not-null" database's contraint will be added). 

copyablebooleannotrue
(except hasMany, manyToMany and tree fields)
If true value of this field will be copied during entity copy.
Should be set to false for unique (see above) fields (except string and text).

persistent

boolean

no

true

If true this field will be stored in database.

Common attributes for primitive field types

name

type

required

default value

description

unique

boolean

no

false

If true this field will be unique (validator with case insensitive).
Should be set to false for copyable (see Common model field attributes) fields (except string and text).

default

string

no

none

Default value of this field. Is used only for FormComponent. This flag is ignored when entity is saving to database without view.

Example

<decimal name="salary" />
  • No labels