change id injection, and account for more permutations

in particular, editing a record to add habtm associations won't
necessarily have a model->alias top key