make insert query set the id property when no id exists