that are the modified models which works for me class Province include DataMapper::Resource
property :name_short, String, key: true, length: 2, unique: true property :name_long, String, length: 1..50 has n, :municipalities, 'Municipality'#, # parent_key: [:name_short], # child_key: [:province] end class Municipality include DataMapper::Resource # property :province, String, key: true, length: 2 property :name, String, key: true, length: 1..40 property :lat, Float property :long, Float property :current_population, Integer belongs_to :province, 'Province'#, # parent_key: [:name_short], # child_key: [:province] end -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To unsubscribe from this group and stop receiving emails from it, send an email to datamapper+unsubscr...@googlegroups.com. To post to this group, send email to datamapper@googlegroups.com. Visit this group at http://groups.google.com/group/datamapper?hl=en. For more options, visit https://groups.google.com/groups/opt_out.