si posteas un previo del modelo (yml) con las tablas seria más fácil ayudarte e indicarla cardinalidad de cada una con respecto a la otra:
para un blog:
Código YAML:
Ver originalCategoria:
connection: doctrine
tableName: blog_categoria
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
sequence: blog_categoria_id #postgres
nombre:
type: string(50)
fixed: false
unsigned: false
notnull: false
primary: false
relations:
Articulo:
local: id
foreign: categoria_id
type: many
Articulo:
connection: doctrine
tableName: blog_articulo
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
#postgres
sequence: blog_articulo_id
titulo:
type: string()
fixed: false
unsigned: false
notnull: false
primary: false
culturainfo:
type: string(200)
fixed: false
unsigned: false
notnull: false
primary: false
contenido:
type: string()
fixed: false
unsigned: false
notnull: false
primary: false
created_at:
type: timestamp(25)
fixed: false
unsigned: false
notnull: false
primary: false
adicional:
type: string(20)
name: adicional as campox
fixed: false
unsigned: false
notnull: false
primary: false
categoria_id:
type: integer(4)
fixed: false
unsigned: false
notnull: true
primary: false
relations:
Comentario:
local: id
foreign: articulo_id
type: many
Categoria:
local: categoria_id
foreign: id
type: one
Comentario:
connection: doctrine
tableName: blog_comentario
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
sequence: blog_comentario_id
articulo_id:
type: integer(4)
fixed: false
unsigned: false
notnull: true
primary: false
autor:
type: string()
fixed: false
unsigned: false
notnull: false
primary: false
contenido:
type: string()
fixed: false
unsigned: false
notnull: false
primary: false
created_at:
type: timestamp(25)
fixed: false
unsigned: false
notnull: false
primary: false
relations:
Articulo:
local: articulo_id
foreign: id
type: one