MongoDB
 sql >> Base de Dados >  >> NoSQL >> MongoDB

activerecord e ponte mongo/mongo-mapper


Isso funcionou lindamente

modelo de lugares

  key :location_id, Integer, :required => true

    def location
        Location.find(location_id)
    end

modelo de locais

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

  def find_places
    Property.find_by_location_id(id)
  end