Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

duplicate association names should be rejected #44

Open
solnic opened this issue May 17, 2011 · 2 comments
Open

duplicate association names should be rejected #44

solnic opened this issue May 17, 2011 · 2 comments

Comments

@solnic
Copy link
Contributor

solnic commented May 17, 2011

If I define two different associations having the same name, DataMapper should warn and/or reject the model.


Created by Clifford Heath - 2010-09-23 07:03:10 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1417

@solnic
Copy link
Contributor Author

solnic commented May 17, 2011

Clifford,

Currently (recent master) DM overwrites the previously defined relationship. This is in line with ruby method redefinition behavior and also something I find intuitive. Do you mean that DM should warn/reject in case the name of the relationships match, but their type doesn’t? So that it’s fine to redefine a, say, 1:1 relationship with the same name but different options, but not allow to create an m:1 relationship with the same name? That would make sense to me. Is this what you mean?

by Martin Gamsjaeger (snusnu)

@solnic
Copy link
Contributor Author

solnic commented May 17, 2011

[bulk edit]

by Dan Kubb (dkubb)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant