Связанная issue: cycle/orm#149 В основе проект yiisoft/demo
Выполняемая команда на добавление фикстур: yii fixture/add 200
- данные рандомные и относительно рандомного объёма (между двумя запусками могут отличаться на 50%)
- Сущности: User, Post, Comment, Tag
- Схема:
[comment] :: default.comment Entity : App\Blog\Entity\Comment Mapper : App\Blog\Comment\CommentMapper Constrain : App\Blog\Comment\Scope\PublicScope Repository : App\Blog\Comment\CommentRepository Primary key: id Fields : (property -> db.field -> typecast) id -> id -> int public -> public -> int content -> content created_at -> created_at -> datetime updated_at -> updated_at -> datetime published_at -> published_at -> datetime deleted_at -> deleted_at -> datetime user_id -> user_id -> int post_id -> post_id -> int Relations : comment->user belongs to user eager load cascaded not null comment.user_id <==> user.id comment->post belongs to post promise load cascaded not null comment.post_id <==> post.id [post] :: default.post Entity : App\Blog\Entity\Post Mapper : App\Blog\Post\PostMapper Constrain : App\Blog\Post\Scope\PublicScope Repository : App\Blog\Post\PostRepository Primary key: id Fields : (property -> db.field -> typecast) id -> id -> int slug -> slug title -> title public -> public -> int content -> content created_at -> created_at -> datetime updated_at -> updated_at -> datetime published_at -> published_at -> datetime deleted_at -> deleted_at -> datetime user_id -> user_id -> int Relations : post->user belongs to user promise load cascaded not null post.user_id <==> user.id post->tags many to many tag promise load cascaded not null post.id <= postTag.post_id|postTag.tag_id => tag.id post->comments has many comment promise load cascaded not null post.id <==> comment.post_id [postTag] :: default.post_tag Entity : App\Blog\Entity\PostTag Mapper : Cycle\ORM\Mapper\Mapper Constrain : no constrain Repository : Cycle\ORM\Select\Repository Primary key: id Fields : (property -> db.field -> typecast) id -> id -> int post_id -> post_id -> int tag_id -> tag_id -> int No relations [tag] :: default.tag Entity : App\Blog\Entity\Tag Mapper : Cycle\ORM\Mapper\Mapper Constrain : no constrain Repository : App\Blog\Tag\TagRepository Primary key: id Fields : (property -> db.field -> typecast) id -> id -> int label -> label created_at -> created_at -> datetime Relations : tag->posts many to many post promise load cascaded not null tag.id <= postTag.tag_id|postTag.post_id => post.id [user] :: default.user Entity : App\User\User Mapper : Cycle\ORM\Mapper\Mapper Constrain : no constrain Repository : App\User\UserRepository Primary key: id Fields : (property -> db.field -> typecast) id -> id -> int login -> login passwordHash -> password_hash created_at -> created_at -> datetime updated_at -> updated_at -> datetime Relations : user->posts has many post promise load cascaded not null user.id <==> post.user_id user->comments has many comment promise load cascaded not null user.id <==> comment.user_id