Axelor Doc

The field types

string

Field String

Definition
<string name="fieldName"/>

By default, the maximum size of a field of this type is 255 characters. If the field must contain a larger text, define the attribute large = "true" .

boolean

A field Boolean (null | true | false)

Definition
<boolean name="fieldName"/>

integer

Field Integer

Definition
<integer name="fieldName"/>

decimal

Field BigDecimal

Definition
<decimal name="fieldName"/>

It is recommended to set the precision and scale attributes. The precision is the total number of significant digits (before and after the decimal point), scale is the number of digits of the decimal part. If scale is not defined, it will, default, 2.

long

Field Long

Definition
<long name="fieldName"/>

date

A field LocalDate

Definition
<date name="fieldName"/>

datetime

A field LocalDateTime

Definition
<datetime name="fieldName"/>

time

A field LocalTime

Definition
<time name="fieldName"/>

binary

A field byte []

Definition
<binary name="fieldName"/>

one-to-one

A field entityClass

Definition
<one-to-one name="fieldName" ref="entityClass"/>

A one-to-one may be unidirectional or bidirectional. In the second case, the slave entity must specify a field return (one-to-one) and mappedBy attribute, which must reference the field that bears the master side relationship.

many-to-one

A field entityClass

Definition
<many-to-one name="fieldName" ref="entityClass"/>

Associates the current parent item on this subject field.

one-to-many

Field Set <entityClass>

Definition
<one-to-many name="fieldName" ref="entityClass"/>

A one-to-many may be unidirectional or bidirectional. In the second case, the master entity must specify a return (many-to-one) field, and the slave entity bringing the one-to-many, must define the mappedBy attribute on the many-to-one master .

many-to-many

Field Set <entityClass>

Definition
<many-to-many name="fieldName" ref="entityClass"/>

A relationship many-to-many can be unidirectional or bidirectional. In the second case, the target entity also carries a many-to-many relationship to the entity master. This relationship must include a mappedBy attribute to the entity master.