public function onBeforeWrite()
{
//prevent empty data - '*' must be used
foreach (self::$defaults as $field => $value) {
if (empty($this->{$field})) {
$this->{$field} = $value;
}
}
//TODO: prevent non-heirarichal entries, eg country = '*', then state = 'blah'
parent::onBeforeWrite();
}