This website uses cookies to ensure you get the best experience on our website.

Skip to content
LOGO
  • Company

    About IGNEK

    Learn about our story and our mission.

    Careers

    We're hiring!

    We always looking for talented peoples. Join our team!

    Blogs

    The latest industry news, updates and info.

    Case Studies

    Take a closer look at the projects we've delivered

    Webinar

    Watch our latest organized webinar

    Get in touch with our HR team

    • hr@ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Custom Enterprise Portal Development for flawless Solutions

    Dedicated Development Team

    Expand Teams, Optimize Development with Our Expertise

    Back-end Development

    Empowering your digital presence with robust backend development expertise

    Front-end Development

    Crafting engaging user experiences through expert frontend development

    Digital Transformation

    Embrace digital transformation by modernizing process

    SaaS Development

    Transform your business with SaaS Innovative Solutions

    Technologies

    Liferay Services

    Development & Customization

    Theme

    Upgradation

    Migration

    Proof of Concept

    Performance Tunning

    Architecture

    Support & Maintenance

    E-commerce

    Expert Advice

    React Services

    Enterprise Development

    Custom Application

    Single Page Application

    Architecture

    API Integration

    Migration

    Consulting

    Maintenance & Support

    Spring Boot Services

    Web Service

    MVC Web Development

    API Integration

    Security

    Migration

    Microservices

    Support & Maintenance

    AEM Services

    Consulting Service

    Site Development

    Migration & Upgradation

    Integration

    Maintenance & Support

    Custom Solutions

    Content Management

    Team Augementation

  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Transforming industries through cutting edge SaaS solutions.

    Customer Portal : Boost Business Productivity

    Streamline operations and enhance productivity with our Customer Portal solution.

    Liferay Based Intranet Portal

    Internal portal for company communication, collaboration and resources

    Integration

    Matomo Integration with Liferay

    Integrate Matomo to enable user interactions seamlessly.

    Microsoft Teams integration with Liferay

    Integrate to enable seamless collaboration, messaging within your portal.

    Jira Integration With Liferay

    Optimizes business operations by integrating with Jira.

  • Hire Us

    Liferay

    Get expert Liferay developers for seamless portal solutions.

    React JS

    Get expert ReactJS developers for dynamic web solutions.

    Web Developer

    Get custom web solutions from IGNEK's expert developers.

    Spring Boot

    Get top-notch Spring Boot developers for your project success!

    Healthcare

    Get top Healthcare Developers for cutting-edge medical software.

    MERN Stack

    Get expert MERN developers from IGNEK for custom, innovative project solutions.

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@ignek.com
    • +91 6351576580
    • info@ignek.com
    • Ahmedabad, Gujarat, India – 382470
SCHEDULE CALL
  • COMPANY
    • About
    • Case Studies
    • Blogs
    • Career
    • Webinar
  • SERVICES
    • Enterprise Portal Development
    • Dedicated Development Team
    • Back-end Development
    • Front-end Development
    • Digital Transformation
    • SaaS Development
  • SOLUTION
    • Customer Portal:  Boost Business Productivity
    • SaaS : Software as a Service
    • Liferay Based Employee Intranet Portal
  • TECHNOLOGY
    • Liferay Services
      • Liferay Development and Customization
      • Liferay Theme Development Service
      • Liferay DXP 7.4 Upgrade
      • Liferay Migration
      • Liferay Proof Of Concept
      • Liferay Performance Tuning
      • Liferay Architecture Design Service
      • Liferay Support And Maintenance Service
      • Liferay Ecommerce Development
      • Liferay Expert Advice
    • ReactJS Services
      • ReactJS Enterprise Application Development
      • ReactJS Custom Application Development
      • ReactJS Single Page Application Development (SPA)
      • ReactJS Applications Architecture
      • ReactJS API Integration
      • ReactJS Migration
      • ReactJS Consulting
      • ReactJS Maintenance and Support
    • Spring Boot Services
      • Spring Boot Web Development Service
      • Spring MVC Web Development
      • Spring Boot API Integration Service
      • Spring Boot Security
      • Spring Boot Migration Service
      • Spring Boot Microservices
      • Spring Boot Support & Maintenance Service
    • AEM Development Services
      • AEM Consulting Services
      • AEM Site Development
      • AEM Migration & Upgradation
      • AEM Integration Services
      • AEM Maintenance & Support
      • AEM Content Management
      • Custom AEM Solutions
      • AEM Team Augmentation
  • INTEGRATION
  • HIRE US
    • Hire Liferay Developer
    • Hire ReactJS Developer
    • Hire Spring Boot Developer
    • Hire Healthcare Developer
    • Hire Web Developer
    • Hire MERN Stack Developer
  • CONTACT US
  • Company

    About IGNEK

    Careers

    We're hiring!

    Blogs

    Case Studies

    Webinar

    Get in touch with our HR team

    • hr@ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Dedicated Development Team

    Back-end Development

    Front-end Development

    Digital Transformation

    SaaS Development

    Technologies

    Liferay Liferay Services
    • Development & Customization
    • Theme
    • Upgradation
    • Migration
    • Proof of Concept
    • Performance Tuning
    • Architecture
    • Support & Maintenance
    • E-commerce
    • Expert Advice
    React React Services
    • Enterprise Development
    • Custom Application
    • Single Page Application
    • Architecture
    • API Integration
    • Migration
    • Consulting
    • Maintenance & Support
    Spring Boot Spring Boot Services
    • Web Service
    • MVC Web Development
    • API Integration
    • Security
    • Migration
    • Microservices
    • Support & Maintenance
    AEM AEM Services
    • Consulting Service
    • Site Development
    • Migration & Upgradation
    • Integration
    • Maintenance & Support
    • Custom Solutions
    • Content Management
    • Team Augmentation
  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Customer Portal : Boost Business Productivity

    Liferay Based Intranet Portal

    Integration

    Matomo Integration with Liferay

    Microsoft Teams integration with Liferay

    Jira Integration With Liferay

  • Hire Us

    Liferay

    React JS

    Web Developer

    Spring Boot

    Healthcare

    MERN Stack

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@ignek.com
    • +91 6351576580
    • IGNEK
    • Ahmedabad, Gujarat, India – 382470
  • SCHEDULE CALL

Managing Relationships in Liferay Objects

  • Liferay
  • May 31, 2024

Share On :

Introduction:
A clear understanding of object relationships is a must during the development of the Liferay portal. These relationships define how different objects are connected within the Liferay portal. How to manage the relationships between Liferay objects is covered in this blog.
Prerequisites:
  • Liferay 7.4
Step 1: Create an Object
  • Start by creating two to three objects within Liferay and adding the necessary fields. Save the object.
  • Take references from the blog below to create an object: https://ignek.com/blog/objects-in-liferay-7-4/
Step 2: Relationships between the object
  • Before working on that, understand the types of relationships. There are mainly two types of object relationships:
    • One to Many 
      • This relationship works like one object entry from the parent object being connected to multiple object entries from the child object.
      • In ‘One to Many’ relationships, the relationship is visible in the parent object’s relationship tab while the relationship field is created in the child object’s field tab.
    • Many to Many
      • This relationship works like multiple object entries from the parent object are connected to the multiple object entries from the child object.
      • Understand this scenario, multiple students are enrolled in multiple courses, and vice versa, multiple courses are selected by multiple students.
Step 3: One to Many Relationships
  • This relationship helps to relate one object entry from an object to multiple object entries from another object.
  • Access the control panel and navigate to OBJECT > Objects.
  • Select an object.
  • Click on the “+” icon on the relationships tab to create a new relationship.
Create new relationship of type One to many
    • The label will represent the relationship in the Liferay UI.
    • The name will determine the relationship in the backend. The value of this field will not change after publishing the object.
    • Select One to Many relationships to connect one object entry from the parent object to many object entries from the child object.
    • By default, the current object is selected in the ‘One Recored of’ field.
    • Select the child object in the ‘Many records of’ field.
    • Click save, and a field of relationships will be created in the child object.
Field of one to many relationship
Step 4: Many to Many Relationships
  • This relationship helps to connect multiple object entries from an object to many object entries from another object.
  • Access the control panel and navigate to OBJECT > Objects.
  • Select an object.
  • Click on the “+” icon on the relationships tab to create a new relationship.
Create new relationship of type Many to many
    • The label field will represent the relationships in Liferay’s UI.
    • The name field will determine the relationship in the backend. The value of this field will not change after the object is published.
    • Select the “Many to Many” type to connect multiple object entries from the parent object to many object entries from the child object.
    • By default, the current object is selected in the ‘Many recorded of’ field while creating a new relationship of many to many types. Which is considered a parent object.
    • Select the child object in the other ‘Many Records of’ field.
    • Fields in ‘Many to Many’ relationships are visible in the object layout.
Create a layout to add value to the fields
  • Navigate to the layouts page and click the ‘Add Object Layout’ button. A pop-up box will appear next. Give a name to the layout and hit the save button.
Layout
  • Select the layout tab, click on the “Add tab” button, type the tab’s name, and then click on the “Save” button. Add the block the same way and add some fields.
  • To create a relationship tab and add value to the relationship’s fields, once again use the “Add tab” button.
Create a tab for relationship
      • Label: Add the label according to the requirements.
      • Type: Select type as relationships.
      • Relationship: Select the many-to-many relationship that was created previously in this step and save it.
      • Mark layout as default and save the object.
  • Now navigate to the object’s layout by following the panel link to the object’s details.
  • The relationship tab will be visible, like in the image, once the page has been refreshed and the values have been added to the object.
Relationship tab
  • Now, select items from the child object by clicking the “add” button.
Values of child object
Step 5: Deletion type
  • There are mainly three types of conditions under which Liferay allows the deletion of relationship entries.
    • Prevent: This will prevent the deletion of entries if any related child entries are there.
    • Disassociate: This will allow the user to delete the parent entry without affecting the child entry. It will just remove the association between entries.
    • Cascade: This will enable the user to remove the parent entry, but Liferay will also remove the child entry.

Explore Our Services

Discover how we can help your business thrive, whether you’re running a small startup, an SME, or a large enterprise. We’re here to understand your unique needs and goals, offering the expertise and resources to support your journey to success.

Stay informed about our Liferay services and updates by subscribing to our newsletter—just fill in the details below to subscribe.

Loading
Loading...

Related Blogs

August 1, 2022
Object in liferay Cover Image
Objects in Liferay 7.4
December 29, 2022
Liferay Objects with Liferay forms Cover Image
Liferay Objects with Liferay forms
December 1, 2023
Liferay object With Message Bus
Liferay Objects with Message bus
Loading...

Featured Projects Portfolios

November 27, 2023
Government Job Platform User-Friendly, Secure and Scalable
Government Job Platform : User-Friendly, Secure, and Scalable
October 4, 2023
DAM Solution using Liferay Headless Portal Architecture
DAM Solution using Liferay : Headless Portal Architecture
October 3, 2023
Simplify Approvals and Goals With Agenda & Meeting SaaS Platform
Simplify Approvals and Goals With Agenda & Meeting SaaS Platform

Digital Solutions for Your Business with IGNEK

4.9

5.0

5.0

5.0

LOGO

Making the world a better place through constructing elegant hierarchies

COMPANY

  • About
  • Career
  • Case Study
  • Blogs

SERVICES

  • Enterprise Portal Development
  • Dedicated Development Team
  • Back-end Development
  • Front-end Development
  • Digital Transformation
  • SaaS Development

HIRE US

  • Liferay
  • Spring Boot
  • ReactJS
  • Healthcare
  • MERN Stack
  • AEM

CONTACT

  • info@ignek.com
  • info@ignek.com
SALES
  • sales@ignek.com
  • (+91) 635 157 6580
CAREER
  • hr@ignek.com
  • (+91) 932 849 5160
  • E 910-912, Ganesh Glory 11, Jagatpur Road, SG Highway, Ahmedabad, Gujarat - 382470

© 2018-2025 IGNEK, Inc. All rights reserved

Linkedin Facebook X-twitter Instagram