cycle/annotated

Cycle ORM Annotated Entities generator

v1.0.4 2019-06-13 15:20 UTC

README

Latest Stable Version Build Status Scrutinizer Code Quality Codecov

Example:

/**
 * @entity(repository = "Repository/UserRepository")
 */
class User
{
    /**
     * @column(type=primary)
     * @var int
     */
    protected $id;
    
    /**
     * @hasOne(target=Profile, load=eager)
     * @var Profile
     */
    protected $profile;
    
    /**
     * @hasMany(target=Post, load=lazy)
     * @var Post[]|Collection
     */
    protected $posts;
   
    /**
     * @manyToMany(target=Tag, though=TagMap, load=lazy)
     */
    protected $tags;
    
    ...
}