manage-entities

Create and maintain Apache OFBiz XML entity definitions for database tables.

175|216|Updated Mar 5, 2017
One-click install
npx skills add https://github.com/apache/ofbiz-plugins --skill manage-entities
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: manage-entities
Source: https://github.com/apache/ofbiz-plugins/tree/main/ai-agent-skills/manage-entities
Command: npx skills add https://github.com/apache/ofbiz-plugins --skill manage-entities

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables the definition and maintenance of the OFBiz Data Model, ensuring database structures accurately reflect business requirements and can be managed efficiently.

Core Features & Use Cases

  • Entity Definition: Create and modify database tables (entities) and their relationships using XML.
  • View Entities: Define complex joins and aggregations for data retrieval.
  • Data Integrity: Enforce constraints, primary keys, and relationships for robust data management.
  • Use Case: When developing a new feature that requires storing customer preferences, use this skill to define a new CustomerPreference entity and link it to the existing Party entity.

Quick Start

Use the manage-entities skill to define a new entity named 'ProductFeature' with fields 'featureId' and 'description' in the 'com.myplugin.product' package.

Frequently Asked Questions about manage-entities

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a new database table in Apache OFBiz using XML?

To define a new database table in Apache OFBiz, create an XML entity definition specifying the entity name, package, primary keys, and field types. This registers the entity within the framework while adhering to OFBiz conventions for data integrity.

What is an OFBiz view-entity and when should I use it?

An OFBiz view-entity is an XML definition used to define complex joins and aggregations for data retrieval. Use view-entities when your feature requires querying normalized data across multiple database tables simultaneously.

How do I extend core framework entities in an OFBiz data model?

You extend core framework entities in an OFBiz data model by modifying the XML entity definitions to add new fields, constraints, or relationships. This allows you to append custom data structures to existing framework tables without altering base code.

Can I enforce data integrity and constraints using OFBiz XML entity definitions?

Yes, you enforce data integrity in OFBiz by defining primary keys, field types, and relationships directly within the XML entity definitions. These constraints ensure robust data management and maintain structural consistency across the database.

What is the best way to link a new custom entity to an existing Party entity in OFBiz?

The best way to link a custom entity to the existing Party entity is by defining a relationship within your XML entity definition. This establishes the necessary join constraints and adheres to OFBiz conventions for relational mapping.