Module: Sequel::Model::Associations::InstanceMethods

Module | Sequel::Model::Associations::InstanceMethods
In: | lib/sequel/model/associations.rb

Private instance methods used to implement the associations support.

### Methods

pk_or_nil

### Public Instance methods

pk_or_nil()

Used internally by the associations code, like pk but doesn‘t raise an Error if the model has no primary key.

[Source]

         # File lib/sequel/model/associations.rb, line 941
    941:         def pk_or_nil
    942:           key = primary_key
    943:           key.is_a?(Array) ? key.map{|k| @values[k]} : @values[key]
    944:         end

[Validate]