I have the following model and I need to retrieve all the subscriptions that have among their connected subscriptions a subscription (of which I know the primary key)
In practice I need all the subscriptions that contains a subscription in their
connected_subscriptionfield
Subscription(models.Model):
connected_subscriptions=models.ManyToManyField('self', blank=True)
How can I retrieve all the subscriptions?
Subscription.objects.filter(connected_subscription__???=subscription_key)