﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24289	Is usage of many_to_one and one_to_many terms confusing for relation flags?	Anssi Kääriäinen	nobody	"EDIT: we haven't mixed the terms up, I did that myself. The docs might need an update though.

It seems we have mixed up the naming of many_to_one and one_to_many. For example these references point out that ForeignKey is many_to_one: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_8.2.0/com.ibm.db2.udb.doc/admin/c0004733.htm, https://docs.djangoproject.com/en/1.7/topics/db/examples/many_to_one/.

But in Django, ForeignKey is one_to_many.

I'm not going to mark this as accepted, as I always get confused with many-to-one and one-to-many. So, please do triage this carefully!

If at all possible I think we should use something that is less easy to get mixed up. I never recall how these terms should be interpreted, and I guess I am not alone here. Some ideas:
  - Just is_multivalued flag: Check if field is one to many: ""not field.is_multivalued and field.rel.is_multivalued""
  - local_multivalued and remote_multivalued flags

My experience from ORM work is that the interesting thing to check is if the relation can have multiple values on the remote side. The local multi-valuedness isn't usually that interesting (although it might be in other contexts)."	Bug	closed	Database layer (models, ORM)	1.8alpha1	Normal	invalid			Unreviewed	0	0	0	0	0	0
