In case when table does not have "id" as auto increment primary key and metaData() is used connection reset occurred.
Is something wrong with following definition in metaData() method?
class WebsitePluginVersion extends Model
{
public $website_id;
public $plugin_version_id;
public $plugin_id;
public $status;
public $date_created;
public $date_updated;
public function initialize()
{
//
}
public function metaData()
{
return [
MetaData::MODELS_ATTRIBUTES => [
'website_id',
'plugin_version_id',
'plugin_id',
'status',
'date_created',
'date_updated',
],
MetaData::MODELS_PRIMARY_KEY => [
'website_id',
'plugin_version_id',
'plugin_id',
],
MetaData::MODELS_NON_PRIMARY_KEY => [
'status',
'date_created',
'date_updated',
],
MetaData::MODELS_NOT_NULL => [
'website_id',
'plugin_version_id',
'plugin_id',
],
MetaData::MODELS_DATA_TYPES => [
'website_id' => Column::TYPE_INTEGER,
'plugin_version_id' => Column::TYPE_BIGINTEGER,
'plugin_id' => Column::TYPE_INTEGER,
'status' => Column::TYPE_CHAR,
'date_created' => Column::TYPE_DATETIME,
'date_updated' => Column::TYPE_DATETIME,
],
MetaData::MODELS_DATA_TYPES_NUMERIC => [
'website_id' => true,
'plugin_version_id' => true,
'plugin_id' => true,
],
MetaData::MODELS_DATA_TYPES_BIND => [
'website_id' => Column::BIND_PARAM_INT,
'plugin_version_id' => Column::BIND_PARAM_INT,
'plugin_id' => Column::BIND_PARAM_INT,
'status' => Column::BIND_PARAM_STR,
'date_created' => Column::BIND_PARAM_STR,
'date_updated' => Column::BIND_PARAM_STR,
],
MetaData::MODELS_AUTOMATIC_DEFAULT_INSERT => [
'date_created' => true,
'date_updated' => true,
],
MetaData::MODELS_AUTOMATIC_DEFAULT_UPDATE => [
'date_created' => true,
'date_updated' => true,
],
MetaData::MODELS_DEFAULT_VALUES => [
],
MetaData::MODELS_EMPTY_STRING_VALUES => [
],
];
}
}