anchor.diff:          %% FIXME: original code for create_node had the following match, but seems like
           %% crashing would be better if we get an unexpected error.
           %% Error -> Error
  -    end.
  +    end;
  +create_object(QueryName, Record) when is_atom(QueryName) ->
  +    List = flatten_record(Record),
  +    create_object(QueryName, List).
  +
  +-spec job_fields_for_insert(CbFields:: list()) -> list().
  +job_fields_for_insert(CbFields) ->
  +   %% We drop the last record field - job_nodes
  +   lists:reverse(tl(lists:reverse(CbFields))).
   
   %% @doc Inserts job_nodes records into the database. All records are timestamped
   %% with the same stamp, namely `CreatedAt`, which is a binary string in SQL date time
  
positive.code:     end.
  
  -spec create_object(atom(), tuple() | list()) -> {ok, non_neg_integer()} | {error, term()}.
  create_object(QueryName, Record) when is_atom(QueryName) ->
      case sqerl:statement(QueryName, flatten_record(Record), count) of
          {ok, N} ->
              {ok, N};
          {error, Reason} ->
  
negative.code:     create_object(insert_node_status, NodeStatus1);
  %% This does not exactly follow the same pattern as it needs to
  %% insert a list of job_nodes into a separate table.
  create_object(#pushy_job{status = Status, job_nodes = JobNodes}=Job) ->
      %% convert status into an integer
      Job1 = Job#pushy_job{status=job_status(Status)},
      Fields0 = flatten_record(Job1),
      Fields = job_fields_for_insert(Fields0),
      %% We're not dispatching to the general create_object/2 because creating a job
      %% involves adding multiple rows to multiple tables. Also, we currently embed a list of
      %% job nodes in the job record; this won't play nicely with the general
  