Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polimorfic association is incomplete #14

Open
Pensarfeo opened this issue Dec 6, 2015 · 3 comments
Open

Polimorfic association is incomplete #14

Pensarfeo opened this issue Dec 6, 2015 · 3 comments

Comments

@Pensarfeo
Copy link
Collaborator

The polimorfic association we have right now does not uniquely define a relation. And can bring wrong results.
Ex
We have two tables: Men, Women
When we call find_relation we might find relationships withing Men and Women as well as Men/Men & Women/Women.

@sungwoncho
Copy link
Collaborator

Yes. I think a solution would be to make the friend_type column in the friendship table. Currently we only have friend_id. Any thoughts?

@sergeyryabov
Copy link

How about using uuid as primary key instead id?

@chevinbrown
Copy link
Contributor

@Pensarfeo should a unique index fix this issue?

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

No branches or pull requests

4 participants