Database Changes After Adding Liferay Account User
Created: 4 December 2024 Modified:What data changes occur when an account user is added to Liferay. Added account user Seller Manager. This user 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 user Seller Manager.
- User_
- Table to store user data.
- Primary key is userId.
- Row was added for Seller Manager.
- UserId for Seller Manager is 32603.
- UserId for Default is 20096.
- AccountEntryUserRel
- Table to store data defining the relationships between accounts and users.
- Primary key is accountEntryUserRelId.
- Row was added for Seller Manager
- AccountEntryUserRelId value is 32608.
- AccountEntryId value is for 32503 for the already existing Rock Seller account.
- AssetEntry
- Table to track assets. In Liferay pretty much anything can be an asset.
- Row was added for Seller Manager user.
- UserId was 20123 pointing to Test Test user.
- ClassNameId was 20071 with ClassPk of 32603. Which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- Contact_
- Table to store contact data.
- Users will have contact data.
- Row was added for Seller Manager.
- Foreign key userId has value 20123. This references the Adminstrator account that added the data.
- ClassNameId was 20071 which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- ClassPk was 32603 which points to the Seller Manager user.
- Group_
- Table to track groups. Groups are effectively sites. This is a site specifically for the Rock Seller account.
- GroupId was 32605
- ClassNameId was 20071 which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- ClassPk was 32603 which points to the Seller Manager user.
- LayoutSet
- Table to track layout sets which are effectively web pages.
- GroupId is 32605.
- Two layout sets added. One private and one public.
- ResourcePermission
- Table to track permissions to resources such as portlets and models.
- OwnerId was 20123 which points to the Test Test user.
- Row added for group 32605
- Row added for user 32603
- Ticket
- Table to track tickets. Whatever that means.
- Row added for Seller Manager user.
- ClassNameId was 20071 which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- ClassPk was 32603 which points to the Seller Manager user.
- User_Roles
- Table to link users with roles.
- Row was added for Seller Manager
- Seller Manager was added to User role.
- Foreign key userId has value 32603
Diagram is only showing the relationships most relevant.
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - account - user