What is an object model builder?

Create and manage objects from single window

What is an Object Model Builder?

Object Model Builder is another way to design objects, including object settings and relationships. It supports visual representations of all object relationships and allows you to categorize objects in different folders.

 

How can we enable that?

In the Latest Liferay, we can enable this feature from the feature flags placed at Instance Settings > Feature Flags > Release.

From this page, you can enable the feature Object Model Builder.

 


 

How to use it?

We can access this feature from the main page of objects only.

Here is the new layout of the Object screen after I enabled the Model Builder feature

There will be one default folder, under which Liferay will put all current objects. Anyway,  you can create new folders and move objects there.

Let’s create a new folder and create objects in it.

Here I have created a folder, and I can change the ERC as well.

We can create objects from this folder and from Model Builder as well. In this blog, I will create objects using Model Builder.

  • Click on “View in Model Builder”, It will open a page like below

  • Click on the Create New Object button. It will ask for the basic details of an object and allow you to create a draft object from here.

  • Once the draft object is created, you can add new fields from this page only. For that, you can click on the Add Field option.

  • We can change the metadata from the right panel when we click on any object.


 

What are the advantages of Model Builder?

  1. Visualization of all objects and relationships are possible with it.

  2. Can create multiple objects and publish all objects at once after doing all configurations.

  3. Maintain folder structures for different kinds of objects.

  4. Maintain metadata for all objects on a single page.