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
).
Liferay provides these field types that correspond to specific data types in the back-end:
Field Types (UI) |
Data Type (HEADLESS) |
Description |
---|---|---|
String |
Stores read-only values calculated using values from a relationship table. Available functions include |
|
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. |
Integer |
Integer |
Stores an integer up to nine digits in length. |
Long Integer (previously Long) |
Long |
Stores a large integer up to 16 digits in length. |
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. |
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. |