MongoDB
 sql >> Datenbank >  >> NoSQL >> MongoDB

Activerecord und Mongo / Mongo-Mapper-Bridge

Das hat wunderbar funktioniert

Ortsmodell

  key :location_id, Integer, :required => true

    def location
        Location.find(location_id)
    end

Standortmodell

  def self.find_places(id)
    Property.find_by_location_id(id)
  end

  def find_places
    Property.find_by_location_id(id)
  end