From e0627c714826f2e1ead2bddd9e50a4aa052008e8 Mon Sep 17 00:00:00 2001 From: jeffreyguo Date: Wed, 11 Mar 2015 15:01:48 +1300 Subject: [PATCH] Update 01_Data_Model_and_ORM.md --- .../02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md b/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md index ee21eeb4e..d7670f262 100644 --- a/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md +++ b/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md @@ -409,7 +409,7 @@ And removing Sig and Sam with that are either age 17 or 43. 'Age' => array(17, 43) )); - // SELECT * FROM Player WHERE ("FirstName" NOT IN ('Sam','Sig) OR "Age" NOT IN ('17', '74)); + // SELECT * FROM Player WHERE ("FirstName" NOT IN ('Sam','Sig) OR "Age" NOT IN ('17', '43')); You can use [SearchFilters](searchfilters) to add additional behavior to your `exclude` command. @@ -548,7 +548,7 @@ The data for the following classes would be stored across the following tables: - LastEdited: Datetime - Title: Varchar - Content: Text - NewsArticle: + NewsPage: - ID: Int - Summary: Text @@ -558,7 +558,7 @@ Accessing the data is transparent to the developer. $news = NewsPage::get(); foreach($news as $article) { - echo $news->Title; + echo $article->Title; } The way the ORM stores the data is this: @@ -575,7 +575,7 @@ example above, NewsSection didn't have its own data, so an extra table would be * In all the tables, ID is the primary key. A matching ID number is used for all parts of a particular record: record #2 in Page refers to the same object as record #2 in `[api:SiteTree]`. -To retrieve a news article, SilverStripe joins the [api:SiteTree], [api:Page] and NewsArticle tables by their ID fields. +To retrieve a news article, SilverStripe joins the [api:SiteTree], [api:Page] and NewsPage tables by their ID fields. ## Related Documentation