Set has_many polymorphic foreign keys for belongs_to or HABTM
Move callbacks so that before_save occurs before saving the node properties. This enables autosave associations to work