---
detect_relations: true
options:
collate: latin1_swedish_ci
charset: latin1
type: InnoDB
artist:
columns:
id:
type: integer(4)
primary: true
unsigned: true
notnull: true
autoincrement: true
name:
type: string(45)
song:
columns:
id:
type: integer(4)
primary: true
notnull: true
artist_id:
type: integer(4)
unsigned: true
name:
type: string(45)
relations:
artist:
class: artist
local: artist_id
foreign: id
foreignAlias: songs
singer:
columns:
id:
type: integer(4)
primary: true
unsigned: true
notnull: true
autoincrement: true
name:
type: string(45)
singerSingSong:
tableName: singer_sing_song
columns:
song_id:
type: integer(4)
primary: true
notnull: true
singer_id:
type: integer(4)
primary: true
unsigned: true
notnull: true
relations:
song:
class: song
local: song_id
foreign: id
foreignAlias: singer_sing_songs
singer:
class: singer
local: singer_id
foreign: id
foreignAlias: singer_sing_songs
# Code with model
$a = new artist();
var_dump($a->songs);
$s = new song();
var_dump($s->artist);
var_dump($s->singer_sing_songs->song);
Title:
Doctrine - YAML schema file example
Description:
--- detect_relations: true options: collate: latin1_swedish_ci charset: latin1 type: InnoDB artist: columns: id: ...
...
Rating:
4