次のテーブルがある場合:
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
特定のデータベースを見つけるにはどうすればよいですか(つまり、これは私の問題を単純化しすぎているため、2つ以上のテーブルを参照しています)?Potter
Potter