avoid exception when saving empty associations
Merge pull request #283 from balvig/empty_arrays

avoid exception when saving empty associations