Skip to content

set_primary_key attribute not inherited #11

@jbgo

Description

@jbgo

I'm expecting that if I change the primary key attribute on a base class, then subclasses will use the new primary key attribute. This does not appear to be the case.

class M1 < Perry::Base
  attributes :foo
  set_primary_key :foo
end

M1.primary_key # => :foo

class M1 < M2; end

M2.primary_key # => :id

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions