Skip to content
Lance Pollard edited this page Sep 24, 2012 · 1 revision

has search by key to figure out it's a relation

push(relationName: [new Model])

has search by nested key to figure out it's a relation,

need a map of 'a.b.c' to relation

push('nested.relation': [new Model])

knows it's relations, so doesn't need to do any lookups

limits you to only pushing in relations, can't push in a mixture

push({'nested.relation': [new Model]}, @relations)

Can push in arbitrary data, requires lookup for each key.

therefore, need to cache keys to type

push(relationName: [new Model], title: "A title")

Clone this wiki locally