-
Notifications
You must be signed in to change notification settings - Fork 10
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
Not working as documented since 0.40 #20
Comments
Hi Tomohiro, |
Hi Alexander,
Yes, but I thought it would be a long sentence to get a reply, so I made it easy.
I understand. I first looked at t/lib/DBICTest/Schema and t/lib/DBSchema, but I couldn't find anything suitable to reproduce the bug, so I created it. To reproduce the bug as a many_to_many link table
not
is needed. Thank you for your reply despite being busy. I will check it a bit more. |
I was able to reproduce the bug using DBICTest on master. |
Hi Alexander, I have further investigated. master...bokutin:indent_warn master...bokutin:fix_side_effect 5487ac1 [1] 87c6d36 [2] 09ea2e0 bokutin/dbix-class-resultset-recursiveupdate@reduce_dup_code...bokutin:feature_accessors I'm hoping that the [1] and [2] fixes will be merged. I also tried #1. Hope I can continue to use the RU without any known bugs. Thanks, |
Hi Tomohiro, master...bokutin:indent_warn master...bokutin:fix_side_effect Are 5487ac1, 87c6d36 and 09ea2e0 cumulative? I'm surprised that this doesn't work for you as in our schema we always prefix foreign key columsn with 09ea2e0 is awesome, I was too lazy so far although I knew that there was duplicate code, thanks!!! bokutin/dbix-class-resultset-recursiveupdate@reduce_dup_code...bokutin:feature_accessors |
Code based on master...bokutin:indent_warn is committed as dcc3f88. |
master...bokutin:fix_side_effect is commited as 06fbd56. |
Hi Alexander,
I passed the tests on 5487ac1 and 87c6d36 first, and then reduced the code on 09ea2e0 to not break the tests. The commit comes with a test, so try running it. It should fail. Perhaps the fk_id from belongs_to wasn't collected before find, so if fk_id is included in the unique index then update_or_insert will fail to update instead of insert and will fail.
I'll try.
I understand. I'd like to write a failing test case for 0.42 and make a pull request, noting the related_rows comment. I'm not interested in my code being merged as is. I hope it works as documented. Thanks! |
Oh, this is my preference.
|
I'm also likely to get a little busy. First of all, I wrote a test to pass for 0.42. https://github.com/gshank/dbix-class-resultset-recursiveupdate/compare/master...bokutin:topic/0.42-more-test?expand=1 RecursiveUpdate.pm for this is the same as last time, but I'm going to make it simpler and add more comments. |
Did you work on a consecutive or changed pull-request? |
Hi! |
Hello.
I'll make the question simple.
It seems that RU doesn't work unless schema is rel_name == pk naming in case of many_to_many from 0.40.
The output of the test is below.
https://github.com/bokutin/recursiveupdate-test/blob/master/out.txt
The schema is below.
https://github.com/bokutin/recursiveupdate-test/tree/master/t/lib/M2MTest
Is my usage wrong?
I think I am using it as DESIGN CHOICES - Treatment of many-to-many pseudo relations.
It would be greatly appreciated if someone could answer.
The text was updated successfully, but these errors were encountered: