#366 invalid
Will Prater

Allow has 1 fk to be a primary key without another key on Model

Reported by Will Prater | June 11th, 2008 @ 02:03 AM

It would be nice to allow has 1 to create a fk that would act as the only key for the Model. No need for a serial or other key for that model like so:

class Workout

include DataMapper::Resource

has 1, :user

property :user_id, Integer, :key => true

  1. Prefer not to use the below serial key
  2. property :id, Integer, :serial => true

property :data, Text

property :created_at, DateTime


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