cphalcon
cphalcon copied to clipboard
[BUG]: saving model with mutliple fields relation is "not implemented"
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
it's prd_name defined in the model?
@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 hello! Do you have any new information on this bug?
@Drummi42 no, nothing new. still not working.