Changed autogenerate from create to update