#349 √ resolved
Phil Darnowsky

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

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 »

Shared Ticket Bins

People watching this ticket