Skip to content

Commit

Permalink
BUG Ensure extra fields have correct casting
Browse files Browse the repository at this point in the history
Fixes #124
  • Loading branch information
Damian Mooyman committed Apr 4, 2018
1 parent 9cdec2e commit 85f4e65
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Versioned.php
Expand Up @@ -167,6 +167,21 @@ class Versioned extends DataExtension implements TemplateGlobalProvider, Resetta
"PublisherID" => "Int"
];

/**
* Ensure versioned records cast extra fields properly
*
* @config
* @var array
*/
private static $casting = [
"RecordID" => "Int",
"WasPublished" => "Boolean",
"WasDeleted" => "Boolean",
"WasDraft" => "Boolean",
"AuthorID" => "Int",
"PublisherID" => "Int"
];

/**
* @var array
* @config
Expand Down

0 comments on commit 85f4e65

Please sign in to comment.