Using Object Inheritance

Release Feature (LPD-34594)

Liferay DXP 2025.Q1+/Portal GA132+

You can enhance the one-to-many relationship by enabling inheritance. When enabled, the one object in the one-to-many relationship becomes the root object that the child object entries inherit from.

Enable inheritance on one-to-many relationships.

When inheritance is enabled,

  • Permissions are inherited from the root object.
  • All API endpoints are grouped under the root object.

Beginning in Liferay DXP 2025.Q4 and Portal 2026.Q1, a single object definition can be a child of more than one parent and inherit attributes from each one. The permissions and configuration of each child entry are inherited from its parent entry, according to the parent definition. For example, when defining a User, it makes sense to include an Address object definition’s fields. When created in the scope of the User, the Address entry inherits from its parent User entry. Meanwhile, the Address definition might also be used as a child of the Account object in an inheritance relationship, and Address entries created alongside Accounts inherit their permissions and configuration from Accounts.

Because of multi-parent inheritance at the object definition level, the relationship field cannot be set as mandatory in the child object definition. This means you can create child object entries with a parent entry defined, or standalone entries with no parent at all. Standalone entries use the permissions and configurations defined in their own object definition.

Understanding Root Objects

Some applications are comprised of many data models (i.e., object definitions), but it’s more convenient if they behave as a unified model. For these applications, defining a strong dependence of the child entities on the parent entity (i.e., the root model) can be beneficial.

While defining one-to-many relationships among your custom objects, you can make the parent object definition a root model in the structure by enabling inheritance.

Enable inheritance to create root object hierarchies.

You cannot enable inheritance for relationships involving system objects.

When inheritance is enabled,

  • Child object definitions inherit permissions, including account restrictions from the root object definition.
  • All API endpoints are grouped under the parent.

In a commerce orders application, the order and its child order item entities should be accessed and managed centrally, with the order as the root model object definition.

In Liferay, the Dataset Manager Application (release feature flag) uses the root model concept.

The Data Set Manager (release feature status) uses root object inheritance.

Use inheritance whenever you want the child and parent entities to share permissions and configurations.

Enabling Root Objects

  1. Go to Control PanelInstance Settings.

  2. Enable the release feature flag called Root Object Definitions (LPD-34594).

  3. Once enabled, you can toggle the Enable Inheritance checkbox while configuring a one-to-many relationship.

Using Workflow with Root Objects

Liferay DXP 2025.Q3+

If inheritance is enabled, a child object entry uses the workflow configuration of the parent object definition. For example, only one of the object definitions pictured below can be activated in the workflow: Country.

A parent object definition can have multiple children.

Any change to a parent or any of its children puts the whole root model, parent and children, into the workflow. Therefore, changing a child entry sends its parent into the workflow. If that parent is at the root of another inheritance structure, all its related children are now also in the workflow. One notification is sent and one workflow task must be completed.

Consider a parent object definition called Country with two child object definitions, Region and City. Inheritance is enabled on both relationships. In this structure, the single approver workflow can be activated for Country. Once activated, adding or updating a City causes the Region entries to become pending in the workflow, because its parent Country is now pending, and the Region’s status is dependent on its parent when inheritance is enabled.