Skip to content

nalgoo/doctrine-custom-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Schema for Doctrine

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;
}

About

Custom annotations for extending schema generation of Doctrine's SchemaTool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages