如果我有以下表格:
class Potter(models.Model):
name = models.CharField()
class Sculpture(models.Model):
potter = models.ForeignKey(Potter)
created = models.DateTimeField()
class Vase(models.Model):
potter = models.ForeignKey(Potter)
created = models.DateTimeField()
我怎样才能找到最新的Sculpture
或具有最少数据库命中Vase
的某个(即这是对我的问题的过度简化,我有两个以上的表引用)?Potter
Potter