- django/Model . . . . 5 matches
class RiskReport(models.Model):
class RiskReport(models.Model):
다대다 관계는 좀더 복잡해질 수 있다. 두 모델 사이에 관계에 해당하는 테이블이 또다른 속성이 필요한 경우이다. 이 때는 중간 역할을 하는 모델을 직접 생성하고 양쪽 모델을 참조하도록 만든다. 다음은 RiskReport와 ControlReport사이 다 대 다 관계에서 보고된 위험에 대해서 대처 방안이 적절했는지 평가하는 is_vaild속성을 가지는 RiskControl모델을 보여주고 있다.
class RiskReport(models.Model):
risk_report= models.ForeignKey(RiskReport)
- django/RetrievingObject . . . . 3 matches
RiskReport.objects.filter(date__gt=datetime.date(2006, 10, 1))
RiskReport.objects.extra(select={'is_recent': " date > '2006-01-01'"})
RiskReport.objects.extra(where=['id IN (3, 4, 5, 20)'])
- django/AggregateFunction . . . . 1 match
RiskReport.objects.count()
Found 3 matching pages out of 7555 total pages (5000 pages are searched)
You can also click here to search title.