Symfony1 Symfony 1.4条令关系问题
下面是我的schema.ymlSymfony1 Symfony 1.4条令关系问题,symfony1,doctrine,symfony-1.4,Symfony1,Doctrine,Symfony 1.4,下面是我的schema.yml CmsFooter: actAs: I18n: fields: [title,description] Timestampable: columns: id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true is_default:
CmsFooter:
actAs:
I18n:
fields: [title,description]
Timestampable:
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: true
is_default:
type: enum(1)
values: [Y, N]
default: N
notnull: true
autoincrement: false
title:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
description:
type: string()
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
LanguageMaster:
actAs:
Timestampable:
columns:
id:
type: integer(11)
fixed: false
unsigned: false
primary: true
autoincrement: true
name:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
culture:
type: string(4)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
is_active:
type: enum(1)
fixed: false
unsigned: false
values:
- Y
- N
primary: false
default: N
notnull: true
autoincrement: false
is_default:
type: enum(1)
fixed: false
unsigned: false
values:
- Y
- N
primary: false
default: N
notnull: true
autoincrement: false
file_name:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations:
CmsFooterTranslation:
local: culture
foreign: lang
type: many
onDelete: CASCADE
onUpdate: CASCADE
我正在生成schema->DB
当我运行这个模式时,它并没有在数据库表中提供关系
表名:-cms\u页脚\u翻译字段:-lang
在关系中,我需要它显示语言、掌握文化、删除级联和更新级联
任何帮助???我定义的工作关系示例如下:
relations:
Testimony:
class: Testimony
local: testimony_id
foreign: id
foreignAlias: HomePage
onDelete: cascade
onUpdate: cascade
foreignType: one
owningSide: true
indexes:
fk_home_page_testimony1:
fields: [testimony_id]
我将再次阅读,并将您的内容与他们的进行比较。作为提示:在您的案例中定义类似布尔值的is\u default时,只需使用:is\u default:{type:boolean,notnull:true,default:0}。它可以为你节省很多工作。你能澄清一下你想完成的表格之间的关系吗?我真的无法从你的问题中摆脱出来。