bowtie
bowtie copied to clipboard
Bowtie gives an error when trying to edit a model without an id field
Where this is likely to come up, is if you have a join table. e.g.
class PostUsers
include DataMapper::Resource
belongs_to :post, :key => true
belongs_to :user, :key => true
end
class Post
include DataMapper::Resource
property :id, Serial
has n, :users, :through => Resource
end
class User
include DataMapper::Resource
property :id, Serial
has n, :posts, :through => Resource
end
Something like that will give this error when accessed via bowtie:
+options[:order]+ entry :id does not map to a property in PostUsers
Not a huge deal, as I was able to add an id property to "PostUsers", but I thought I should document this issue somewhere.