Changes between Version 9 and Version 10 of Ticket #35941


Ignore:
Timestamp:
Dec 2, 2024, 2:20:30 AM (5 weeks ago)
Author:
Csirmaz Bendegúz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35941 – Description

    v9 v10  
    4141It's possible to implement other strategies to deal with composite generic foreign keys.
    4242
    43 1. JSONField - instead of `CharField` / `TextField`, we could make "object_id" a `JSONField`. This achieves the same thing as my proposal but save the `::jsonb` cast.
    44 2. GenericForeignKey with multiple object_ids - less flexible, can't store both regular primary keys and composite primary keys.
     431. ''JSONField'' - instead of `CharField` / `TextField`, we could make "object_id" a `JSONField`. This achieves the same thing as my proposal but saves the `::jsonb` cast.
     442. GenericForeignKey with multiple "object_id"s - less flexible, can't store both regular primary keys and composite primary keys.
    4545
    4646There's no reason we couldn't implement other strategies. I believe my proposal provides the most flexibility and backwards-compatibility (at the cost of performance).
Back to Top