per type commit

group by adapter for type and then commit
Merge pull request #963 from tchak/per-type-commit-for-realz

per type commit