Join column for belongs_to does not respect length of foreign key
Reported by Phil Darnowsky | June 5th, 2008 @ 03:11 PM
Given:
class Foo
include DataMapper::Resource
property :value, String, :key => true, :length => 255, :nullable => false
has n, :bars
end
class Bar
include DataMapper::Resource
property :id, Integer, :key => true, :serial => true
property :title, String, :nullable => false
belongs_to :foo
end
the join column foo_value in table bars should have length 255 to match the foreign key, but it has the default length of 50.
Comments and changes to this ticket
-
-
-
Phil Darnowsky June 5th, 2008 @ 04:24 PM
...and both break the unit tests, which I should've checked first.
-
-
-
Dan Kubb July 9th, 2008 @ 10:50 PM
- → State changed from new to resolved
- → Tag changed from to associations belongs_to bug dm-core
This is resolved in edge DM.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
