Home/Field Guide/Objects & workflow
CONCEPT 07
Liferay Objects and data modeling
Design definitions, fields, relationships, storage, and records that survive real integrations.
Definition, entry, and presentation
An Object definition is the schema and configuration. An Object entry is one record. Publishing a custom definition activates its application and generates headless resources. Layouts and views control how the application displays entries. Form fragments let site authors assemble forms for supported objects on content pages. Changing a form does not change the underlying field type or API contract.
Set company scope when the record should live at virtual-instance level. Set site scope when its lifecycle and ownership belong to a specific site. Company scope does not automatically imply company-wide read access. Make record visibility explicit using roles and the Object permission model. Decide which system owns each field before choosing platform-managed or another supported storage strategy.
Model a request before publishing
| Concept | Example | Decision |
|---|---|---|
| Required Text field | summary |
Set an expected maximum and use a stable field name in integrations |
| Long Text field | details |
Treat content as user input and escape it in custom UIs |
| Picklist | Priority with normal and urgent keys |
Integrate using stable keys and localize display labels |
| One-to-many relationship | Request → request comments | Decide ownership and test deletion behavior |
| External reference code | REQ-CRM-1042 |
Keep a stable source-system identifier across environments |
| Attachment | Supporting document | Check storage, access, and export/import behavior separately |
Start with the smallest schema that supports the lifecycle. Use relationships for records with independent fields and permissions. Keep data classification, indexing needs, validation, and reporting in the schema review. Some definition settings become constrained after publication, so try schema changes in a disposable environment first.
Publish and prove it
Create the definition in the Objects application, add fields and presentation settings, then publish. Open /o/api to confirm the generated path and schema. Add one entry through the application and one through the API. Retrieve each as the intended user. Export the definition separately from the data, version the artifact, and rehearse promotion into a clean environment with its dependencies.
