#11265: ForeignKey/OneToOneField should support user-defined id attribute name
-------------------------------------+-------------------------------------
     Reporter:  dstora               |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  foreign key          |             Triage Stage:  Accepted
  ForeignKey OneToOneField id        |
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by elonzh):

 This is funny, I have a model `Biblio` with a `issn` field, someday I
 created a new model `IssnIndexedData`  with `issn` as primary key.

  I want to join `IssnIndexedData` but it can not be done unless I add a
 logic Foreignkey `issn_indexed_data` with `db_column="issn"` to `Biblio`.
 (See https://code.djangoproject.com/ticket/29262)

 Fine, I just make a fake migration to make Django happy.

 But wait! The `attname` is hard coded and I can't use `Biblio.issn`
 anymore...

-- 
Ticket URL: <https://code.djangoproject.com/ticket/11265#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701864a5b438a-00ba77c1-c4a6-4afb-b246-af975b9b31f6-000000%40eu-central-1.amazonses.com.

Reply via email to