Migration · AMP

Migrating from Service Builder to Liferay Objects

Ankita Varani · Published Apr 16, 2026 · 11 min read · View full version

Quick answer

Migrate Service Builder structures by mapping old XML database entities to Liferay Object definitions. Re-establish relationships, write validation rules using scripts, and use Liferay's auto-generated REST/GraphQL APIs to power frontend widgets.

How Do You Map Service Builder Entities to Liferay Objects?

Direct Answer: Recreate your database entities as Liferay Objects inside the control panel. Map XML fields (like VARCHAR) to Object field types (like Text).

Audit your legacy service.xml. Recreate columns as fields within Liferay Objects. Define data types (integer, string, boolean) and establish relationships (e.g., mapping custom orders to customer accounts) visually in the Object design interface.

For additional optimization strategies, visit our detailed Liferay DXP developer blog listing. For configuration specifications, consult the official Liferay Documentation portal.

Rebuild entity relationships (one-to-many or many-to-many) using the Object relationship tool, which replaces SQL mappings with clean portal metadata.

Setting Validation Rules

In Service Builder, validations required Java code. In Liferay Objects, write validation rules directly in the interface using expressions, regex, or REST validations. This ensures bad data is blocked before saving.

Migrating Database Records

Migrate data by writing migration scripts. Extract records from old tables, map fields to Object schemas, and post them to Liferay's auto-generated REST APIs. Verify database indices to ensure query performance remains fast.

Frequently asked questions

Is Service Builder deprecated in Liferay 7.4?

No. Service Builder is supported, but Liferay recommends using Objects because they require no custom Java compilation and generate standard APIs automatically.

How do we handle custom Java logic in Objects?

Use Object Action client extensions. Register REST endpoints that Liferay calls when objects are created, updated, or deleted.

Read the full article, with table of contents, comparison table, and author bio →