Skip to content

DynamoDbModel constructor is not calling the initializeTraits() method like the parent #261

Open
@nelson6e65

Description

@nelson6e65

Describe the bug
DynamoDbModel is no calling initializeTraits() method, introduced in 5.7 (https://github.com/laravel/framework/blob/5.7/src/Illuminate/Database/Eloquent/Model.php#L168).

Current package constructor implementation:

public function __construct(array $attributes = [])
{
$this->bootIfNotBooted();
$this->syncOriginal();
$this->fill($attributes);
$this->setupDynamoDb();
}

This should be solved, without BC, by just calling the base constructor:

 public function __construct(array $attributes = []) 
 { 
     parent::__construct($attributes); 

     $this->setupDynamoDb(); 
 } 

Schema

Debug info

Version info

  • Laravel: 5.8
  • laravel-dynamodb: 6.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions