Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

hasManyToMany simply does not save related records

I have exactly the same code as in here http://forum.phalconphp.com/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



7.8k
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.