Adds ability to dynamically find auto-increment id.

Previously, when persisting entities, we always start the
auto-incrementing id at 0, regardless of the entities already in the
table. This commit changes allows us to take the max value for the id column
of a table when finding the autogenerated id to persist.
I see. Maybe I'm just missing it, but won't we ```return name``` regardless of whether or not ```autoGenerateId``` is true?