analogueorm / analogue

Analogue ORM : Data Mapper ORM for Laravel/PHP
MIT License
632 stars 51 forks source link

The problem with storing entity with embedding object #231

Closed Insolita closed 6 years ago

Insolita commented 6 years ago

I add in FilterTaskMap

 public function stage(FilterTask $task)
    {
        return $this->embedsOne($task, WorkStage::class, 'stage')
            ->setPrefix('')->setColumnMap(['value'=>'stage']);
    }

And got fails when try test wth storing (test with finding passed successfull and this embed was resolved)

ormerror

WorkStage is simple stdClass ValueObject (Also WorkStageMap exists, and test wtih finidng was passed)

I'll take a more detailed research a bit later

Insolita commented 6 years ago

Made test for entity without relations, only with embededObjects and got same bug;

RemiCollin commented 6 years ago

It was actually a regression caused by the last fix. Should be ok now

Insolita commented 6 years ago

Hurray!