﻿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
29900	ForeignKey foo with to_field=bar option: Accessor should be called foo_bar not foo_id	Paul Zeinlinger	nobody	"I have the following PipeItem model:
{{{
class PipeItem(models.Model):
    entity_uuid = models.UUIDField(db_index=True, default=uuid4, editable=False)
    user = models.ForeignKey(
        User,
        db_column=""user_entity_uuid"",
        to_field=""entity_uuid"",
        on_delete=models.CASCADE,
    )
}}}
Unfortunately, PipeItem.create(user_entity_uuid=""XXXX"") does not accept the keyword argument user_entity_uuid, but just user_id (which is an uuid in this case).
I propose to change the direct accessor name to the name of the corresponding to_field."	Cleanup/optimization	closed	Database layer (models, ORM)	2.1	Normal	wontfix	to_field		Unreviewed	0	0	0	0	0	0
