Convert HasMany from record to module + defrecordp