Skip to content
Discussion options

You must be logged in to vote

@incidentist There is not a way to do what you are asking for because abstract models do not create database tables. You have two options

  1. Make interaction non-abstract. This will create an interaction table and a child table for voicecall and message. When accessing interactions from conversation the polymorphic related manager will downcast each interaction to either a voicecall or message.
  2. Leave interaction abstract and use Django's GenericRelation feature. The downside to generic relations is you lose the ability to do joins - so things like sorting across your interaction types will be difficult.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by incidentist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #398 on January 04, 2026 16:11.