require 'neo4j'

class Show < Neo4j::Rails::Model
  property :show_name, type: String, index: :exact
  has_n :booked_bands
end

#I have another model, band.rb

class Band < Neo4j::Rails::Model
  property :band_name, type: String, index: :exact
  has_n :playing_shows
end

#I create a show.

show = Show.new
show.show_name = "Test Show"
show.save

#I create a band.

band = Band.new
band.band_name = "MyBand"
band.save

puts "Done"

band.playing_shows << show
band.save

# The crux of my question: how do I access the band object's properties when I retrieve it from the show?
# Whenever I try to do something like this:

theshow = band.playing_shows.first

puts "The Band #{band.band_name} will show #{theshow.show_name}"