MyBatis Dynamic SQL has a new feature that can reduce the generated code for record based inserts: https://github.com/mybatis/mybatis-dynamic-sql/pull/969