anchor.diff:              erl_syntax:function(erl_syntax:atom(HasOne),
                   [erl_syntax:clause([], none, [
                               first_or_undefined_forms(
  -                                has_many_application_forms(Type, ForeignKey, 1, id, false, Include)
  +                                has_many_application_forms(Type, QueryForms, 1, id, false, Include)
                               )
                           ])]))
       ].
  
positive.code:             erl_syntax:function(erl_syntax:atom("last_"++Singular),
                  [erl_syntax:clause([], none, [
                              first_or_undefined_forms(
                                      has_many_application_forms(Type, ForeignKey, 1, Sort, not IsDescending, Include)
                                  )
                          ])]))
      ].
  
negative.code:     Type = proplists:get_value(module, Opts, HasOne),
      ForeignKey = proplists:get_value(foreign_key, Opts, atom_to_list(ModuleName) ++ "_id"),
      Include = proplists:get_value(include, Opts, []),
      QueryForms = has_many_query_forms(ForeignKey),
      [erl_syntax:add_precomments([erl_syntax:comment(
                      [lists:concat(["% @spec ", HasOne, "() -> ", Type, " | undefined"]),
                          lists:concat(["% @doc Retrieves the `", Type, "' with `", ForeignKey, "' ",
  