Skip to content

Instantly share code, notes, and snippets.

@jaikdean
Created March 3, 2011 16:41
Show Gist options
  • Save jaikdean/853059 to your computer and use it in GitHub Desktop.
Save jaikdean/853059 to your computer and use it in GitHub Desktop.
Doctrine inheritance stupidity
# THIS DOESN'T WORK
Atom:
columns:
title: { type: string(255) }
News:
columns:
article: { type: text }
inheritance:
extends: Atom
type: column_aggregation
keyField: type
keyValue: NewsArticle
Comment:
columns:
atom_id: { type: integer(5) }
comment: { type: text }
relations:
Atom:
local: atom_id
foreign: id
foreignAlias: Comments
# THIS DOES
Atom:
columns:
title: { type: string(255) }
relations:
Comments:
class: Comment
local: id
foreign: atom_id
foreignAlias: Atom
News:
columns:
article: { type: text }
inheritance:
extends: Atom
type: column_aggregation
keyField: type
keyValue: NewsArticle
Comment:
columns:
atom_id: { type: integer(5) }
comment: { type: text }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment