Get primary key after insert.
Store primary key in hash map.
Use primary key from hasmap in update query.