nalgoo/doctrine-custom-schema
Composer 安装命令:
composer require nalgoo/doctrine-custom-schema
包简介
Custom annotations for extending schema generation of Doctrine's SchemaTool
README 文档
README
This package allows you to define custom schema on top of your ORM model. For instance, creating foreign keys without the need of JoinColumn.
Install via Composer
composer require nalgoo/doctrine-custom-schema
Usage
$entityManager = EntityManager::create(...);
CustomSchemaListener::register($entityManager);
Annotations
ForeignKey
class Entity
{
/**
* @ORM\Column(name="user_id", type="integer", nullable=false)
* @ForeignKey(refTable="user", refColumn="id", onUpdate="CASCADE", onDelete="CASCADE")
*/
public int $userId;
}
统计信息
- 总下载量: 64
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-21