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
- Prefer not to use the below serial key
- property :id, Integer, :serial => true
property :data, Text
property :created_at, DateTime
end
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 »
