Skip to content

Use the field name attributes #6

Open
@davorg

Description

@davorg

We have three attributes that define the fields that are used to define how the "Person" class maps onto Genealogy::Relationship's code. But, currently, we never use them. We should fix that.

The attributes in question are:

  • parent_field_name
  • identifier_field_name
  • gender_field_name

So, for example, we have code in most_recent_ancestor() like this:

return $person1 if $person1->id == $person2->id;

Which should become something like this:

my $id_method = $self->identifier_field_name;
return $person1 if $person1->$id_method == $person2->$id_method;

Maybe there's a better way to approach this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions