0

すみません、うまく質問できません。ルートをまだ知らなくても、ステーションを作成してデータベースに保存できるようにしたいと考えています。モデルを変更するにはどうすればよいですか?

class Station
  include DataMapper::Resource

  property :id,         String, :key => true

  has n, :routes, :through => Resource
end

class Route
  include DataMapper::Resource

  property :id,   Serial, :key => true

  has n, :stations, :through => Resource
end

rubiniusdata_mapper 1.2およびを使用してmariadbいます。

4

0 に答える 0