phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.79k stars 1.97k forks source link

[BUG]: saving model with mutliple fields relation is "not implemented" #16029

Open bakos opened 2 years ago

bakos commented 2 years ago

Describe the bug

When i try to save model with this relation: https://docs.phalcon.io/5.0/pl-pl/db-models-relationships#multiple-fields it couses exception: Not implemented trace lead to phalcon/Mvc/Model.zep line 4962 or in 5081 (i got both lines in some tests)

It was working on v3 and v4.

To Reproduce

Provide output if related. Provide coredump if any. Use https://docs.phalcon.io/en/latest/generating-backtrace as reference.

Steps to reproduce the behavior:

models like in docs

       /** @var Products $product */
        $product = Products::findFirst();
        $product->prd_name = $product->parts->par_name;
        try {
            $product->save();
        } catch (\Exception $e) {
            var_dump($e->getMessage());
            var_dump($e->getFile());
            var_dump($e->getLine());
        }
string(15) "Not implemented" 
string(21) "phalcon/Mvc/Model.zep"
int(5081)

Details

zikezhang commented 2 years ago

it's prd_name defined in the model?

bakos commented 2 years ago

@zikezhang yes it is. models to the example were taken from documentation:

https://docs.phalcon.io/5.0/pl-pl/db-models-relationships#multiple-fields

I had a problem with that in a project where relation is more complicated. But again - it was working in previous versions of phalcon (v3, v4) so something changed.

Drummi42 commented 1 year ago

@bakos hello! Do you have any new information on this bug?

bakos commented 1 year ago

@Drummi42 no, nothing new. still not working.