zoukankan      html  css  js  c++  java
  • symfony3 yml配置文件详解

    AppBundleEntityBlogComment:                    //映射实体
        type: entity                              //类型
        repositoryClass: AppBundleRepositoryBlogCommentRepository      //生成repository类
        table: blog_comment                          //对应表
        indexes:                              //外键信息
            blog_comment_post_id_idx:                    //外键名
                columns:                            //列
                    - post_id                           //外键字段名
        id:                                 //主键配置
            id:                               //字段名
                type: bigint                          //字段类型
                nullable: false                        //是否为null
                options:                            //选项
                    unsigned: false                       //没有设置unsigned属性
                id: true
                generator:                         //配置auto_increment等属性
                    strategy: IDENTITY
        fields:                               //字段配置
            author:                            //字段名
                type: string                         //字段类型
                nullable: false                         //是否为null
                length: 20                          //字段长度
                options:
                    fixed: false
            content:
                type: text
                nullable: false
                length: null
                options:
                    fixed: false
            createdAt:
                type: datetime
                nullable: false
                column: created_at
        manyToOne:                           //多对一关系
            post:                              //表名
                targetEntity: BlogPost                    //映射实体
                cascade: {  }                        //外键约束配置
                fetch: LAZY
                mappedBy: null
                inversedBy: null
                joinColumns:
                    post_id:                          //关联字段别名
                        referencedColumnName: id                //关联字段映射到post表主键名
                orphanRemoval: false
        lifecycleCallbacks: {  }                      //对数据库操作的回调设置

  • 相关阅读:
    Self Host 使用 Exceptionless 实时监控程序运行日志服务
    Asp.Net Core 集成 Hangfire 配置使用 Redis 存储
    阿里云负载不支持 WebSocket 协议与 WSS 和 Nginx 配置问题
    使用 Scrapyd 管理部署 Scrapy 的一些问题
    Ubuntu 安装配置最新版 PostgreSQL
    Anaconda 科学计算环境与包的管理
    Linux 部署 ASP.NET Core 的一些问题记录
    关于 IdentityServer 部署到生产环境相关问题踩坑记录
    推荐一个 MYSQL 的命令行的客户端 MYCLI
    可能是 2017 最全的机器学习开源项目列表
  • 原文地址:https://www.cnblogs.com/zhp-king/p/7093442.html
Copyright © 2011-2022 走看看