reformat code
Retrieve generated ID and return newly created entity