cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

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

Open bakos opened this issue 2 years ago • 4 comments

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

  • Phalcon version: 5.0.0RC3
  • PHP Version: 7.4.30
  • Operating System: Debian 11
  • Installation type: pecl
  • Server: Apache
  • Other related info (Database, table schema): Mariadb 10.3

bakos avatar Jul 22 '22 10:07 bakos

it's prd_name defined in the model?

zikezhang avatar Jul 25 '22 16:07 zikezhang

@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.

bakos avatar Jul 26 '22 06:07 bakos

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

Drummi42 avatar Jan 30 '23 10:01 Drummi42

@Drummi42 no, nothing new. still not working.

bakos avatar Jan 30 '23 11:01 bakos