Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many_to_many relation throws deprecated warning #7

Open
Sadrak opened this issue Aug 12, 2014 · 0 comments
Open

many_to_many relation throws deprecated warning #7

Sadrak opened this issue Aug 12, 2014 · 0 comments

Comments

@Sadrak
Copy link

Sadrak commented Aug 12, 2014

DBIx::Class::ResultSet::search_rs(): search( %condition ) is deprecated, use search( %condition ) instead

I traced that warning down to this line in _save_columns:
$dbic->$accessor($value);

After chatting with the DBIx::Class-Stuff i get this helpful answer:

$obj->m2m_rel just calls $obj->search_related($link_rel)->search_related($foreign_rel, @_, %attrs)
so that becomes ->related_resultset($foreign_rel)->search(1001, %attrs), which is deprecated

And an solution
in that case it should be ->set_m2m_rel({ id => $_ })

But i thinks this must be configurable in HTML::FormFu::Model::DBIC. But i hope this many information is enough to fix it.

nigelm added a commit that referenced this issue Jun 4, 2016
Github issue #7
A spurious update is being generated on a Many-to-many update.
This patch prevents that spurious update but am not sure that it
won't potentially hit other situations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant