Documentation

FieldsΒΆ

Available Liferay 7.4+

Object fields are data definitions that represent database columns and store different types of values. All objects include default system fields, but you can add custom fields to both draft and published objects.

When you publish an object draft, Liferay creates an initial database table that includes all fields and relationships in the draft at the time of publishing. Fields and relationships added after publishing are added to a side table (i.e., [Initial_Table_Name]_x).

All objects include default system fields, but you can add custom fields.

Liferay provides these field types that correspond to specific data types in the back-end:

Field Types (UI)

Data Type (HEADLESS)

Description

Aggregation

String

Stores read-only values calculated using values from a relationship table. Available functions include count, sum, average, min, and max.

Attachment

Relationship > Long

Stores files; by default, uploaded files can be no larger than 100 MB; this field supports all file types accepted by Documents and Media.

Boolean

Boolean

Stores true or false values

Date

Date

Stores date values

Decimal (previously Double)

Double

Stores a decimal number value with a limit of 16 digits.

Example: 999.9999999999999 (16 digits total)

Integer

Integer

Stores an integer up to nine digits in length.

Maximum value: 2147483647

Minimum value: -2147483648

Long Integer (previously Long)

Long

Stores a large integer up to 16 digits in length.

Maximum value: 9007199254740991

Minimum value: -9007199254740991

Long Text (previously Clob)

Clob

Stores a text box value that supports up to 65,000 characters; after creating a Long Text field, you can configure it to limit the number of characters allowed.

Picklist

String

Stores a Picklist string value.

Precision Decimal (previously BigDecimal)

BigDecimal

Stores a high-precision decimal number without rounding and supports up to 16 decimal digits.

Maximum Value: 99999999999999.9999999999999999

Minimum value: -99999999999999.9999999999999999

Relationship

Long

Stores the numeric ID for all related object entries. Objects automatically adds relationship fields to objects on the child side of a One to Many relationship. See Defining Object Relationships for more information.

Rich Text

Clob

Stores text with advanced formatting tools and media elements (e.g., images, videos, audio).

Text (previously String)

String

Stores simple text values up to 280 characters; after creating a Text field, you can configure it to limit the number of characters allowed.

Adding Fields to Objects
Adding and Managing Custom States
Aggregation Fields
Attachment Fields