anchor.diff:              erl_syntax:function(erl_syntax:atom("first_"++Singular),
                   [erl_syntax:clause([], none, [
                               first_or_undefined_forms(
  -                                has_many_application_forms(Type, ForeignKey, 1, Sort, IsDescending, Include)
  +                                has_many_application_forms(Type, QueryForms, 1, Sort, IsDescending, Include)
  +                            )
  +                        ])])),
  +        erl_syntax:add_precomments([erl_syntax:comment(
  +                    [
  +                        lists:concat(["% @spec first_", Singular, "(Conditions) -> ", Type, " | undefined"]),
  +                        lists:concat(["% @doc Retrieves the first `", Type, 
  +                                "' that would be returned by `", HasMany, "(Conditions)'"])])],
  +            erl_syntax:function(erl_syntax:atom("first_"++Singular),
  +                [erl_syntax:clause([erl_syntax:variable(?PREFIX++"Conditions")], none, [
  +                            first_or_undefined_forms(
  +                                has_many_application_forms(Type, QueryFormsWithConditions, 1, Sort, IsDescending, Include)
                               )
                           ])])),
           erl_syntax:add_precomments([erl_syntax:comment(
  
positive.code:     Type = proplists:get_value(module, Opts, Singular),
      Include = proplists:get_value(include, Opts, []),
      ForeignKey = proplists:get_value(foreign_key, Opts, atom_to_list(ModuleName) ++ "_id"),
      [erl_syntax:add_precomments([erl_syntax:comment(
                      [
                          lists:concat(["% @spec ", HasMany, "() -> [ ", Type, " ]"]),
                          lists:concat(["% @doc Retrieves `", Type, "' records with `", ForeignKey, "' ",
                                  "set to the `Id' of this `", ModuleName, "'"])])],
              erl_syntax:function(erl_syntax:atom(HasMany),
                  [erl_syntax:clause([], none, [
                              has_many_application_forms(Type, ForeignKey, Limit, Sort, IsDescending, Include)
                          ])])),
          erl_syntax:add_precomments([erl_syntax:comment(
                      [
  
negative.code:             erl_syntax:function(erl_syntax:atom("last_"++Singular),
                  [erl_syntax:clause([], none, [
                              first_or_undefined_forms(
                                      has_many_application_forms(Type, QueryForms, 1, Sort, not IsDescending, Include)
                                  )
                          ])])),
          erl_syntax:add_precomments([erl_syntax:comment(
                      [
                          lists:concat(["% @spec last_", Singular, "(Conditions) -> ", Type, " | undefined"]),
                          lists:concat(["% @doc Retrieves the last `", Type,
                                  "' that would be returned by `", HasMany, "(Conditions)'"])])],
              erl_syntax:function(erl_syntax:atom("last_"++Singular),
                  [erl_syntax:clause([erl_syntax:variable(?PREFIX++"Conditions")], none, [
                              first_or_undefined_forms(
                                      has_many_application_forms(Type, QueryFormsWithConditions, 1, Sort, not IsDescending, Include)
                                  )
                          ])]))
      ].
  