refs #802 - Fixed creating new entity which has no autogenerated primary key.