#349 ✓resolved
Phil Darnowsky

Join column for belongs_to does not respect length of foreign key

Reported by Phil Darnowsky | June 5th, 2008 @ 03:13 PM


class Foo
  include DataMapper::Resource

  property :value, String, :key => true, :length => 255, :nullable => false
  has n, :bars

class Bar
  include DataMapper::Resource

  property :id, Integer, :key => true, :serial => true
  property :title, String, :nullable => false

  belongs_to :foo

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 Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket