fixes #631 - improved code generator when receiving primary key. 
Good job!