
boolean does not work as part of a composite/foreign key in one-to-one
Reported by Angel N. Sciortino (angelic) | July 29th, 2009 @ 04:14 PM | in 0.10.2
Boolean does not work as part of a composite/foreign key in one-to-one. Example:
class ParentModel
include DataMapper::Resource
property :integer_key, Integer, :key => true
property :boolean_key, Boolean, :key => true
property :desc, String
has 1, :child_model, :child_key => [:integer_key, :boolean_key]
end
class ChildModel
include DataMapper::Resource
property :integer_key, Integer, :key => true
property :other_integer_key, Integer, :key => true
property :boolean_key, Boolean, :key => true
property :desc, String
belongs_to :parent_model, :child_key => [:integer_key, :boolean_key]
end
child.parent_model and parent.child_model will both return nil currently
fixed with spec here: http://github.com/angelic/dm-core/commit/20759819cda24115617322b4a8...
Comments and changes to this ticket
-
Angel N. Sciortino (angelic) October 2nd, 2009 @ 10:23 AM
Created a topic branch for this and #994. http://github.com/angelic/dm-core/tree/boolean_key
-
-
Dan Kubb (dkubb) October 7th, 2009 @ 12:27 PM
- Milestone set to 0.10.2
- State changed from new to accepted
- Assigned user set to Dan Kubb (dkubb)
-
Dan Kubb (dkubb) October 16th, 2009 @ 01:22 AM
- State changed from accepted to resolved
(from [f6b68521339928c27057e3ef0749463abd237dc8]) Fix 1:1 with CPK containing a boolean property
[#994 state:resolved]
Signed-off-by: Dan Kubb dan.kubb@gmail.com
http://github.com/datamapper/dm-core/commit/f6b68521339928c27057e3e...
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.
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
Referenced by
-
994 boolean does not work as part of a composite/foreign key in one-to-one Created a topic branch for this and #994. http://github.c...
-
993 Foreign key part of an integer/boolean cpk in a many-to-one relationship Created a topic branch for this and #994. http://github.c...
-
994 boolean does not work as part of a composite/foreign key in one-to-one [#994 state:resolved]