Sha256: 6b1b8340457c46063c85624a3e7cecb9ee289ae09c99a80d5708d5a339f44c40

Contents?: true

Size: 532 Bytes

Versions: 6

Compression:

Stored size: 532 Bytes

Contents

# Copyright 2021 Google LLC
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.

class Album < ActiveRecord::Base
  # The relationship with singer is not really a foreign key, but an INTERLEAVE IN relationship. We still need to
  # use the `foreign_key` attribute to indicate which column to use for the relationship.
  belongs_to :singer, foreign_key: "singerid"
  has_many :tracks, foreign_key: "albumid", dependent: :delete_all
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activerecord-spanner-adapter-1.1.0 acceptance/models/album.rb
activerecord-spanner-adapter-1.0.1 acceptance/models/album.rb
activerecord-spanner-adapter-1.0.0 acceptance/models/album.rb
activerecord-spanner-adapter-0.7.0 acceptance/models/album.rb
activerecord-spanner-adapter-0.6.0 acceptance/models/album.rb
activerecord-spanner-adapter-0.5.0 acceptance/models/album.rb