Database Changes After Adding Liferay Objects
Created: 7 January 2025 Modified:What data changes occur when creating Objects in Liferay. Added the Rock and Mineral objects. A one to many relationship between the Rock object and the Mineral object. This information 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.
The following table was modified but appears not to be strongly relevant.
- Counter
The following tables were modified or created.
- O_64463788232944_Mineral
- Newly created table with no records.
- Primary key is c_mineralId_.
- O_64463788232944_Mineral_x
- Newly created table with no records.
- Primary key is c_mineralId_.
- O_64463788232944_Rock
- Newly created table with no records.
- Primary key is c_rockId_.
- O_64463788232944_Rock_x
- Newly created table with no records.
- Primary key is c_rockId_.
- ObjectDefinition
- Two records inserted.
- Primary key is objectDefinitionId.
- Excerpt of inserted records
-
objectDefinitionId dbTableName name pkObjectFieldDBColumnName 33205 O_64463788232944_Rock c_rockId_ c_rockId_ 33233 O_64463788232944_Mineral c_mineralId_ c_mineralId_
-
- ObjectField
- 15 records inserted.
- Primary key is objectFieldId.
- Excerpt of inserted records
-
objectFieldId objectDefinitionId businessType dbColumnName dbTableName name 33206 33205 Text userName ObjectEntry creator 33207 33205 Date createDate ObjectEntry createDate 33208 33205 Text externalReferenceCode ObjectEntry externalReferenceCode 33209 33205 LongInteger objectEntryId ObjectEntry id 33210 33205 Date modifiedDate ObjectEntry modifiedDate 33211 33205 Text status ObjectEntry status 33229 33205 Text name_ O_64463788232944_Rock name 33234 33233 Text userName ObjectEntry creator 33235 33233 Date createDate ObjectEntry createDate 33236 33233 Text externalReferenceCode ObjectEntry externalReferenceCode 33237 33233 LongInteger objectEntryId ObjectEntry id 33238 33233 Date modifiedDate ObjectEntry modifiedDate 33239 33233 Text status ObjectEntry status 33241 33233 Text name_ O_64463788232944_Mineral name 33254 33233 Relationship r_rockMineral_c_rockId O_64463788232944_Mineral r_rockMineral_c_rockId
-
- ObjectFieldSetting
- Four records inserted.
- Primary key is objectFieldSettingId.
- Excerpt of inserted records
-
objectFieldSettingId objectFieldId name value 33230 33229 uniqueValues true 33242 33241 uniqueValues true 33255 33254 objectDefinition1ShortName Rock 33256 33254 objectRelationshipERCObjectFieldName r_rockMineral_c_rockERC
-
- ObjectFolderItem
- Two records inserted.
- Primary key is objectFolderItemId.
- ObjectFolderId 28542 points to the default record in ObjectFolder.
- Excerpt of inserted records
-
objectFolderItemId objectDefinitionId objectFolderId 33212 33205 28542 33240 33233 28542
-
- ObjectRelationship
- Two records inserted.
- Primary key is objectRelationshipId.
- Excerpt of inserted records
-
objectRelationshipId objectDefinitionId1 objectDefinitionId2 objectFieldId2 name type_ 33253 33205 33233 33254 rockMineral oneToMany
-
- ClassName_
- Two records inserted.
- Primary key is classNameId.
- Excerpt of inserted records
-
classNameId value 33271 com.liferay.object.model.ObjectDefinition#33205 33299 com.liferay.object.model.ObjectDefinition#33233
-
- Configuration_
- Two records inserted.
- Primary key is configurationId.
- ConfigurationId for Rock Object is com.liferay.portal.vulcan.internal.configuration.VulcanCompanyConfiguration~425eac9e-c3db-49cb-8165-0edadde06549
- ConfigurationId for Mineral Object is com.liferay.portal.vulcan.internal.configuration.VulcanCompanyConfiguration~56b94a86-ff51-498f-aa7d-0ca02fedd002
- Portlet
- Two records inserted.
- Primary key is id_.
- Excerpt of inserted records
-
id_ portletId 33298 com_liferay_object_web_internal_object_definitions_portlet_ObjectDefinitionsPortlet_33205 33326 com_liferay_object_web_internal_object_definitions_portlet_ObjectDefinitionsPortlet_33233
-
- PLOEntry
- 52 records inserted.
- Primary key is ploEntryId.
- Tables purpose is to provide language translations of Object names/labels.
- Key_ column appears to point to ClassName_.
- ResourcePermission
- 16 records inserted.
- Primary key is resourcePermissionId.
- Tables purpose is to associate permissions for Portlets and Objects to Roles.
- RoleId points to Role table.
- Name column points to Portlet and ClassName_ tables.
- ResourceAction
- 24 records inserted.
- Primary key is resourceActionId.
- Tables purpose is to associate available actions to Portlets and Objects.
- Name column points to Portlet and ClassName_ tables.
Diagram is only showing the relationships most relevant.
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - object - 7.4