Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
应用程序引擎Jruby数据映射器列表属性_Ruby_Google App Engine_Jruby_Datamapper - Fatal编程技术网

应用程序引擎Jruby数据映射器列表属性

应用程序引擎Jruby数据映射器列表属性,ruby,google-app-engine,jruby,datamapper,Ruby,Google App Engine,Jruby,Datamapper,如何在Google AppEngine上Jruby上的DataMapper中使用list/array作为属性?这将像has..and..belling..to..many一样工作,没有联接表 class Person include DataMapper::Resource property :id, Serial property :name, String, :nullable => false property :project_ids

如何在Google AppEngine上Jruby上的DataMapper中使用list/array作为属性?

这将像has..and..belling..to..many一样工作,没有联接表

class Person
  include DataMapper::Resource
  property :id,          Serial
  property :name,        String, :nullable => false
  property :project_ids, List
  timestamps :at
  # project should be flagged as archived, not deleted
  def projects
    Project.all(:id => project_ids)
  end
end

class Project
  include DataMapper::Resource
  property :id,          Serial
  property :name,        String, :nullable => false
  property :archived,    Boolean, :default => false
  # the join table is bolted onto the person model
  def people
    Person.all(:project_ids => id)
  end
end

有没有关于在AppEngine上使用JRuby进行建模的不同方法的文档?