
Self Relational Many to Many Association not working
Reported by yannick | June 13th, 2009 @ 05:11 PM | in 0.10.2
on mysql it nearly works, it just fails to use aliases
SELECT users.id, users.login
FROM users
INNER JOIN friendships ON friendships.user_id = users.id
INNER JOIN users ON users.id = friendships.friend_id
WHERE friendships.user_id = 1
Comments and changes to this ticket
-
Dan Kubb (dkubb) June 16th, 2009 @ 03:36 AM
- Assigned user set to Dan Kubb (dkubb)
- State changed from new to accepted
- Milestone set to 0.10.0
-
Dan Kubb (dkubb) October 4th, 2009 @ 09:33 PM
- Milestone changed from 0.10.0 to 0.10.2
[project:id#20609 not-tagged:"0.10.0" milestone:id#51895 bulk edit command]
-
Jox December 21st, 2009 @ 08:50 AM
- Tag set to many-to-many, self-referential
-
Dan Kubb (dkubb) December 30th, 2009 @ 04:10 PM
- State changed from accepted to resolved
(from [4cb77c36e1f16a70facd853ad5c7298d24746eaa]) Fix bug with self referential many to many relationships
- Alias tables in m:m queries when necessary
- Move the query conditions from the relationships from the WHERE clause to the ON clause.
- NOTE: need to clean up SQL generation soon. This was a really painful fix, and the code needs major refactoring in order to resolve other outstanding tickets.
[#902 state:resolved] [#1065 state:resolved] http://github.com/datamapper/dm-core/commit/4cb77c36e1f16a70facd853...
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
-
902 Self Relational Many to Many Association not working [#902 state:resolved] [#1065 state:resolved] http://gith...
-
1065 Self-Referential has many doesn't works. [#902 state:resolved] [#1065 state:resolved] http://gith...