We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

hasManyToMany simply does not save related records

I have exactly the same code as in here https://forum.phalcon.io/discussion/598/insert-new-data-with-manytomany-relationship#C2482 and it does not save related songs at all. This code produces an error:

songs_id is required

It seems some guys here at forum have the same behavior.

phalcon 1.2.1, linux mint x86_64, kernel 3.5.0-17



12.2k
Accepted
answer

Yep, exactly. I've set up a repository https://github.com/charnad/phalcon-test to illustrate that issue. Tried on linux and windows 1.2.0 and 1.2.1, created an issue on github (https://github.com/phalcon/cphalcon/issues/938). Waiting for developers to notice.