Database Changes After Adding Liferay Account Role
Created: 10 December 2024 Modified:What data changes occur when an account role is added to Liferay. The account role was added by administrator user Test Test
with email test@test.com. Keep in mind that Liferay doesn’t enforce referential integrity in the database.
Instead it is “enforced” in the code.
Many tables have columns classNameId and classPK. These act as a psuedo foreign key to the ClassName_ table. The ClassName_ table basically references Java classes. These Java classes have associated database tables. ClassPK contains an identifier that references a row in the table. This seems to be used to add levels of abstraction for second order relationships.
Tables that were changed after adding the new account role Rock Sand Role.
- Role_
- Table to store role data.
- Row added for Rock Sand Role.
- Primary key is roleId with value 32903.
- AccountRole
- Table to store account group data.
- Primary key is accountRoleId which is 32904.
- AccountEntryId is 32503 which points to Rock Seller Account.
- RoleId is 32903 which points to Bedstone organization.
- ResourcePermission
- Table to track permissions to resources such as portlets and models.
- Rows were added for role and account role.
- Names were com.liferay.portal.kernel.model.Role and com.liferay.account.model.AccountRole.
- PrimKey values were 32903 and 32904.
- OwnerId was 20123 which points to the Test Test user.
Diagram is only showing the relationships most relevant.
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - account - role