#35269: GeneratedFields can't be defined on RelatedFields
-------------------------------------+-------------------------------------
     Reporter:  Perrine L.           |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by fero):

 Replying to [comment:7 Simon Charette]:
 > You don't need any `GeneratedField` subclass to achieve what you're
 after, simply use `ForeignObject` which is the accessor base of
 `ForeignKey`.

 Thank you very much for the snippet Simon, I am going to try for sure!

 > I also believe there is no reason to add this feature in core as with
 these two primitives it should be trivial to implement a
 `ForeignGeneratedField(ForeignObject)` that does exactly what you're after
 in a third-party application for the rare use case this is useful.

 I am not sure this is a rare case, but you could be right.
 If not, it would be useful to have it imho because needs internal
 knowledge.

 Let's try and see if I am able to build a 3rd party app. Thanks
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35269#comment:8>
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/0107018ea44ff0ad-28d94e36-e729-4691-84e8-5172f9d0b01f-000000%40eu-central-1.amazonses.com.

Reply via email to