bitrix-orm

Automate Bitrix D7 ORM data modeling with DataManager and Table classes.

33|3|Updated Jun 5, 2025
One-click install
npx skills add https://github.com/bxmaximum/bitrix_ai_challenge --skill bitrix-orm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bitrix-orm
Source: https://github.com/bxmaximum/bitrix_ai_challenge/tree/main/.agents/skills/bitrix-orm
Command: npx skills add https://github.com/bxmaximum/bitrix_ai_challenge --skill bitrix-orm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers design and interact with Bitrix D7 ORM, replacing ad-hoc SQL with a structured, type-safe data layer across DataManager and Table classes.

Core Features & Use Cases

  • DataManager and Table scaffolding for Bitrix D7; getMap; field types like IntegerField, StringField, Reference; fetchObject and fetchCollection; add/update/delete; table events; and runtime/query capabilities.

Quick Start

Create a new Bitrix ORM Table by extending DataManager, define its map, and run the ORM tooling to generate IDE annotations.

Frequently Asked Questions about bitrix-orm

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

FAQPage Schema
How do I model data using Bitrix D7 ORM instead of raw SQL?

To model data using Bitrix D7 ORM, you extend the DataManager class to scaffold a Table, define field types in the getMap method, and execute CRUD operations. This replaces ad-hoc SQL by providing a structured, type-safe data layer for your modules.

What is the best way to define relationships in a Bitrix D7 ORM table map?

Defining relationships in a Bitrix D7 ORM table map requires using the Reference field type within your getMap configuration. This establishes structured links between entities, allowing you to fetch related data seamlessly via fetchObject and fetchCollection instead of writing manual SQL joins.

How do I query and fetch objects using Bitrix D7 DataManager?

Querying and fetching objects using Bitrix D7 DataManager involves utilizing standard ORM helpers and runtime query capabilities. You call query methods on your Table class to filter records, then use fetchObject or fetchCollection to retrieve type-safe entity instances directly from the database.

Can I handle table events like add, update, and delete in Bitrix D7 ORM?

Yes, you can handle table events for add, update, and delete operations in Bitrix D7 ORM. The framework supports event handlers within your Table classes, allowing you to trigger custom logic automatically whenever data modifications occur through the DataManager interface.

Does Bitrix D7 ORM support generating IDE annotations for table entities?

Yes, Bitrix D7 ORM supports generating IDE annotations for table entities. After extending DataManager and defining your map, you can run the ORM tooling to automatically generate annotations, ensuring your development environment recognizes the type-safe properties of your data models.

When should I use Bitrix D7 ORM over direct database queries in my module?

You should use Bitrix D7 ORM over direct database queries when you need a structured, type-safe data layer across DataManager and Table classes. It is ideal for managing complex entities, relationships, and CRUD operations, replacing ad-hoc SQL with maintainable, fluent configuration.