Changes between Version 8 and Version 9 of Ticket #35941
- Timestamp:
- Dec 2, 2024, 2:11:00 AM (5 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35941 – Description
v8 v9 41 41 It's possible to implement other strategies to deal with composite generic foreign keys. 42 42 43 1. JSONField - instead of `CharField` / `TextField`, we could make "object_id" a `JSONField` 44 2. GenericForeignKey with multiple object_ids - this is less flexible, can't store regular primary keys43 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. 45 45 46 There's no reason we couldn't implement other strategies , I believe the JSON approach provides the most flexibility (at the cost of performance).46 There'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). 47 47 48 48 Any feedback is appreciated!