7 个仓库
Mechanisms for mapping a single entity to multiple target types through a shared association interface within an ORM.
Distinguishing note: None of the candidates were provided; this is a specific data modeling pattern for ORMs.
Explore 7 awesome GitHub repositories matching data & databases · Polymorphic Associations. Refine with filters or upvote what's useful.
Sequelize is an object-relational mapping library that provides a unified interface for managing relational data through code. By implementing the Active Record pattern, it maps database tables to application objects, allowing developers to perform standard create, read, update, and delete operations using high-level method calls. The library abstracts complex database interactions by translating these calls into optimized, engine-specific SQL statements, ensuring consistent behavior across different database systems. The project distinguishes itself through a comprehensive suite of tools for
Sequelize enables polymorphic associations, allowing a single entity to belong to more than one other type of entity using a shared interface.
SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for interacting with relational databases. It serves as a foundational layer for database connectivity, offering both a high-level object-oriented interface for data persistence and a programmatic SQL expression language for constructing complex, dialect-agnostic queries. The project distinguishes itself through its sophisticated unit of work persistence, which coordinates atomic transactions and tracks object state changes to minimize redundant database operations. It provides a
Associates multiple parent types with a single child object using polymorphic discriminators or flexible foreign key patterns.
PaperTrail is a Ruby on Rails versioning library and database audit trail system. It tracks changes to database models by capturing historical snapshots of object states and associating every modification with the specific user or process responsible for the update. The project provides a model state reification tool to reconstruct model instances as they existed at a specific point in time and a data recovery framework to restore deleted database records by reifying their last known version. The system covers a broad range of capabilities including version history navigation, changeset-base
Uses polymorphic associations to link a single versions table to multiple different model types.
Acts-as-taggable-on 是一个用于 Ruby on Rails 应用程序的关系型数据库标签库。它提供了一个将自定义标签与数据库记录关联的系统,以实现内容分类和过滤。 该库具有上下文标签框架,允许单个记录为不同目的维护不同的标签集。它还包括一个多租户标签系统,将标签限定在特定的账户或组中,以确保数据隐私。 该工具支持基于标签的记录检索、通过精确匹配或排除进行搜索,以及计算集合中的标签频率。它还支持基于共享标签发现相关对象,并跟踪标签所有权以区分全局标签和用户特定标签。
Uses a shared join table with type and ID columns to link tags to any database model.
Twill 是一个 Laravel CMS 工具包和后台管理面板生成器,专为构建自定义管理控制台和内容管理系统而设计。它既是一个无头 CMS 框架,也是一个用于定义内容模型并通过专用管理界面管理结构化数据的工具包。 该项目具有可视化区块编辑器,允许发布者通过拖放界面排列和配置可重用的内容部分。它包含一个专用的数字资产管理器,用于在本地或云存储中存储、裁剪和优化图像及文件,以及一个用于处理翻译字段和本地化固定链接的多语言内容管理器。 该平台提供了广泛的内容和媒体管理功能,包括版本跟踪、发布调度和分层页面组织。它涵盖了全面的管理工具,例如基于角色的访问控制、全局搜索,以及用于快速生成 CRUD 模块和数据库迁移的命令行脚手架。 该系统通过 Trait 与 Laravel 模型集成,以实现发布和媒体处理功能。
Uses polymorphic associations to link media assets across multiple different content types.
Audited is a Ruby on Rails audit log library and change data capture framework. It tracks model changes by recording previous and current attribute values during create, update, and destroy operations to maintain a complete history of database modifications. The system functions as a database versioning tool and user activity tracker. It allows for the retrieval of historical record states by timestamp or index, enables reverting models to previous versions, and associates record modifications with specific user identities and remote IP addresses. The library includes capabilities for sensit
Uses polymorphic associations to link a single audit table to any model within the system.
This project is a Java-based object-relational mapping framework that utilizes the active record pattern to simplify database interactions. It provides a comprehensive data access layer that binds database tables directly to application objects, enabling developers to perform CRUD operations, manage complex entity relationships, and execute queries through a fluent, type-safe interface. Designed for integration with Spring Boot, the framework abstracts database complexities while maintaining support for native compilation and asynchronous execution. The framework distinguishes itself through
Supports polymorphic associations that allow a single model to link to multiple target types using type and ID keys.