Data Object Question

Latest Version:

Question:

what are the differences of these?

will http://www.yoursite.com/dev/build work on the second class?

```
class Player extends DataObject 
{
    private static $db = [
        'PlayerNumber' => 'Int',
        'FirstName' => 'Varchar(255)',
        'LastName' => 'Text',
        'Birthday' => 'Date'
    ];
}


class Player extends Page
{
    private static $db = [
        'PlayerNumber' => 'Int',
        'FirstName' => 'Varchar(255)',
        'LastName' => 'Text',
        'Birthday' => 'Date'
    ];
}

Page is actually a DataObject, but an extension of SiteTree.

Your second example will create a new PageType called Player.

The first example will be a DataObject only and won’t inherit all of the properties that come with SiteTree (pages).

Silverstripe CMS Lessons » Controller Actions / DataObjects as Pages » Silverstripe CMS
DataObjects are more primitive than Page objects. They contain none of the functionality for rendering a template, they have no Link() method, no meta tags, no controllers, etc. In short, they’re not meant to be rendered as full pages.

so i run http://www.yoursite.com/dev/build and created a type. check my database and it has 3 tables:

TrainingAndSupportPage
TrainingAndSupportPage_Live
TrainingAndSupportPage_Versions

what is the purpose of each tables?

Hey Jerome, the Silverstripe docs are getting pretty good nowadays. A lot of the answers to your questions can be found in there.