Legacy WordPress Entities
- 1. Overview
- 2. User & Person Management (Legacy)
- 3. Content Management (Legacy)
- 4. Taxonomy System (Legacy)
- 5. WooCommerce Entities (Legacy)
- 6. Association Entities (Legacy)
- 7. WordPress Configuration
- 8. Entity Relationships
- 9. Migration Strategy
- 10. Entity Summary
- 11. Compatibility Notes
- 12. Related Documentation
|
Deprecation Notice All entities documented on this page are part of the legacy WordPress database integration and will be deprecated within the next 6 months. These entities are maintained for backward compatibility only while data migration to the primary event-database is underway. Migration Timeline:
|
1. Overview
The WordPress database entities provide integration with legacy WordPress installations that were previously used for user management, content management, and e-commerce (via WooCommerce). This includes user/person data and historical order information.
Package: za.co.idealogic.wordpress
Repository: wordpress-database
Total Entities: 15
2. User & Person Management (Legacy)
2.1. User
WordPress user account representing a person in the system.
Inheritance: Base class with JOINED inheritance strategy
Key Relationships:
-
One-to-many with UserMeta
-
Referenced by OrgUser (event-database)
-
Referenced by EventParticipant (event-database)
-
Referenced by Membership (event-database)
Attributes:
-
Username (user_login)
-
Email address
-
Display name
-
Registration date
-
User status
Migration Target: Dedicated Person entity in event-database (future)
2.2. UserMeta
Key-value metadata for User entities, following WordPress’s EAV (Entity-Attribute-Value) pattern.
Key Relationships:
-
Many-to-one with User
Attributes:
-
Meta key
-
Meta value (longtext)
Common Meta Keys:
-
first_name- Person’s first name -
last_name- Person’s last name -
date_of_birth- Birth date -
gender- Gender -
phone- Contact number -
id_number- National ID -
emergency_contact- Emergency contact info -
Custom profile fields
Migration Strategy: Flatten to Person entity attributes
3. Content Management (Legacy)
3.1. AbstractPost
Base entity for WordPress posts using single-table inheritance.
Inheritance: SINGLE_TABLE strategy with discriminator column post_type
Subclasses:
-
WooCommerceProduct (discriminator: "product")
-
WooCommerceOrder (discriminator: "shop_order")
Attributes:
-
Post title
-
Post content
-
Post status (publish, draft, pending)
-
Post date
-
Post author (User reference)
-
Post type (discriminator)
Key Relationships:
-
One-to-many with PostMeta
-
Many-to-many with TermTaxonomy (via TermRelationship)
4. Taxonomy System (Legacy)
WordPress’s taxonomy system for categorizing and organizing content.
4.1. Term
Individual term/tag used in taxonomies.
Key Relationships:
-
One-to-many with TermMeta
-
One-to-many with TermTaxonomy
Attributes:
-
Term name
-
Term slug (URL-friendly)
Examples:
-
Category: "Marathon"
-
Tag: "Trail Running"
-
Product Category: "Running Shoes"
4.2. TermTaxonomy
Links terms to taxonomies and manages hierarchical relationships.
Key Relationships:
-
Many-to-one with Term
-
Many-to-many with AbstractPost (via TermRelationship)
-
Self-referential (parent term)
Attributes:
-
Taxonomy name (category, post_tag, product_cat, etc.)
-
Description
-
Parent term reference
-
Count (number of posts)
Taxonomy Types:
-
category- Post categories -
post_tag- Post tags -
product_cat- WooCommerce product categories -
product_tag- WooCommerce product tags
5. WooCommerce Entities (Legacy)
Legacy e-commerce functionality that has been superseded by the financial entities in event-database.
5.1. WooCommerceProduct
Product entity from WooCommerce. Extends AbstractPost with discriminator "product".
Inheritance: Extends AbstractPost (SINGLE_TABLE)
Attributes:
-
All AbstractPost attributes
-
Product-specific metadata (via PostMeta):
-
_price- Product price -
_regular_price- Regular price -
_sale_price- Sale price -
_stock- Stock quantity -
_sku- Product SKU -
_virtual- Is virtual product -
_downloadable- Is downloadable
-
Migration Target: Product entity in event-database
5.2. WooCommerceOrder
Order entity from WooCommerce. Extends AbstractPost with discriminator "shop_order".
Inheritance: Extends AbstractPost (SINGLE_TABLE)
Attributes:
-
All AbstractPost attributes
-
Order-specific metadata (via PostMeta):
-
_order_total- Total amount -
_order_currency- Currency code -
_payment_method- Payment method -
_customer_user- Customer User ID -
billing*- Billing address fields -
shipping*- Shipping address fields
-
Key Relationships:
-
One-to-many with WooCommerceOrderItem
Migration Target: Order entity in event-database
5.3. WooCommerceOrderItem
Individual line items within a WooCommerce order.
Key Relationships:
-
Many-to-one with WooCommerceOrder
-
One-to-many with WooCommerceOrderItemMeta
Attributes:
-
Order item name
-
Order item type (line_item, fee, shipping, tax)
-
Order ID reference
Migration Target: OrderLineItem entity in event-database
5.4. WooCommerceOrderItemMeta
Metadata for order items (EAV pattern).
Key Relationships:
-
Many-to-one with WooCommerceOrderItem
Attributes:
-
Meta key
-
Meta value (longtext)
Common Meta Keys:
-
_product_id- Product reference -
_quantity- Quantity ordered -
_line_total- Line total amount -
_line_tax- Tax amount
6. Association Entities (Legacy)
Early implementation of entity relationships that has been superseded by direct JPA relationships.
6.1. Association
Generic association/relationship between entities.
Attributes:
-
Association type reference
-
Source entity type and ID
-
Target entity type and ID
-
Association metadata
Key Relationships:
-
Many-to-one with AssociationType
-
One-to-many with AssociationMeta
Migration Strategy: Replace with direct entity relationships (e.g., EventParticipant, LinkedPerson)
6.2. AssociationType
Defines types of associations.
Attributes:
-
Type name
-
Description
-
Source entity type
-
Target entity type
Key Relationships:
-
One-to-many with Association
-
One-to-many with AssociationTypeMeta
Example Association Types:
-
Person-to-Person (guardian, team member)
-
Event-to-Person (participant, organizer)
-
Organisation-to-Person (member, official)
7. WordPress Configuration
7.1. Option
WordPress site configuration and settings stored as key-value pairs.
Attributes:
-
Option name (key)
-
Option value (longtext)
-
Autoload flag
Common Options:
-
Site settings (site_url, home, blogname)
-
Theme settings
-
Plugin configurations
-
WooCommerce settings
Migration Strategy: Not migrated; settings moved to application configuration
8. Entity Relationships
User -------- 1:N --------> UserMeta
|
+-- (extended by) --> UserWrapper
|
+-- (referenced by) --> OrgUser (event-database)
|
+-- (referenced by) --> EventParticipant (event-database)
AbstractPost -------- 1:N --------> PostMeta
|
+-- (subclass) --> WooCommerceProduct
|
+-- (subclass) --> WooCommerceOrder -------- 1:N --------> WooCommerceOrderItem
|
| 1:N
|
WooCommerceOrderItemMeta
Term -------- 1:N --------> TermMeta
|
| 1:N
|
TermTaxonomy -------- N:M (via TermRelationship) -----> AbstractPost
Association -------- 1:N --------> AssociationMeta
|
| N:1
|
AssociationType -------- 1:N --------> AssociationTypeMeta
9. Migration Strategy
9.1. Phase 1: Dual-Write (Months 1-3)
-
Continue writing to WordPress database
-
Simultaneously write to event-database entities
-
Maintain data synchronization
-
Monitor data consistency
10. Entity Summary
| Entity | Purpose | Migration Target |
|---|---|---|
User/Person Management |
||
User |
User accounts |
Person (future entity) |
UserMeta |
User metadata |
Person attributes |
UserWrapper |
Extended user |
Person |
Content Management |
||
AbstractPost |
Post base class |
Various |
PostMeta |
Post metadata |
Flattened attributes |
Taxonomy System |
||
Term |
Taxonomy terms |
Not migrated |
TermTaxonomy |
Taxonomy structure |
Not migrated |
TermRelationship |
Post-term links |
Not migrated |
TermMeta |
Term metadata |
Not migrated |
WooCommerce |
||
WooCommerceProduct |
Products |
Product (event-database) |
WooCommerceOrder |
Orders |
Order (event-database) |
WooCommerceOrderItem |
Order items |
OrderLineItem (event-database) |
WooCommerceOrderItemMeta |
Item metadata |
Flattened attributes |
Associations |
||
Association |
Entity relationships |
Direct JPA relationships |
AssociationType |
Relationship types |
Not migrated |
AssociationMeta |
Association metadata |
Not migrated |
AssociationTypeMeta |
Type metadata |
Not migrated |
Configuration |
||
Option |
WordPress settings |
Application config |
11. Compatibility Notes
During the migration period:
-
Read Operations: Application reads from both databases with fallback logic
-
Write Operations: Writes to both databases (dual-write mode)
-
Foreign Keys: OrgUser, EventParticipant, Membership still reference WordPress User
-
Data Consistency: Automated sync jobs ensure consistency
-
Reporting: Financial reports aggregate data from both databases
12. Related Documentation
-
Financial Management Entities (replacement for WooCommerce)