-
Notifications
You must be signed in to change notification settings - Fork 150
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
Postpone 'create_related' rows until main row is created #78
base: current/blead
Are you sure you want to change the base?
Conversation
We can add related (children) row *ONLY AFTER* main (parent) row is created!!! So we *MUST* postpone creation.
We can add related (children) row *ONLY AFTER* main (parent) row is created!!! So we *MUST* postpone creation.
|
What does red cross mean and how kill it? ) |
|
There is an automated system that merges your contributions and tests the result under all supported linux configurations. If you click on the "details" to the right of the "red cross", you will be taken to a list of failed builds. Looking at the log of each will give you a hint why everything broke. In your particular case you used Data::Dump which is not available on a "virgin" perl, so everything fails. You can fix this and re-submit the PR - the build job will start again. |
|
Why I get different results here and on travis? Test Summary Report And here: What I miss that error 'Not an ARRAY reference at /home/travis/build/dbsrgits/dbix-class/blib/lib/DBIx/Class/Row.pm line 181' not printed locally? |
|
And why when I run prove it uses mine system DBIx ("/home/kes/perl5/lib/perl5") and not that which is located in current directory (t/lib)? |
|
Hmmm.. can not create new issue, that is because I am contributor now?? )) The problem is the inc::Module::Installer says about it install all required modules, but it do not install: |
|
t/99dbic_sqlt_parser.t ........... Can't locate object method "new" via package "SQL::Translator" (perhaps you forgot to load "SQL::Translator"?) at t/99dbic_sqlt_parser.t line 294. |
Check the 2nd option here https://metacpan.org/pod/distribution/Test-Harness/bin/prove#OPTIONS |
It marks them for installation. You need to |
I have explicitly disabled the |
… above! Copy-past code is merged together into 'create_related_rows' and 'filter', 'single', 'multi' work through that sub
|
I did it =) |
|
KES777++ This is a lot of code to review. I am especially wary of the removal of 'filter'. Likely won't get back to you in several days. If you do not hear anything until Monday - give me a ping. |
|
@KES777 Actually, looking at the overall diff there seems to be no test case for the actual problem you encountered. At this point in the project's lifetime there must be an integration (not unit) test for almost every behavioral change. Please, if time permits adapt the test from https://rt.cpan.org/Ticket/Display.html?id=104375#txn-1495758 as a proper .t based on DBICTest->init_schema. For the You asked in https://rt.cpan.org/Ticket/Display.html?id=104375#txn-1495758 whether the current test schema/fixture are documented. They unfortunately aren't, several people attempted to and ended up with nothing so far. The main set of relations is There are other tables as well, but the main part of tests run against these. The preloaded data can be found here: https://github.com/dbsrgits/dbix-class/blob/current/blead/t/lib/DBICTest.pm#L428. Alternatively you can elect to populate the schema yourself: https://github.com/dbsrgits/dbix-class/blob/current/blead/t/prefetch/manual.t#L13-L48 Cheers! |
it is not removed. It were merged as noted here (see -247): ## 'filter' should disappear and get merged in with 'single' above! Actually, in code, I have changed, there are few point we must pay attention:
MY RESOLUTION: code is safe and you must not worry about it ;-) Merge or not it is your decision. Look at test - all passed.
This is not behavioral change. It is leaved same. It is better to say this patch is BUGFIX for not noted yet bug: You can not add slave rows without master row not exist!!! But code, I have fixed, violate this DB integrity rule. And actually this patch does not resolve my issue, but this one step to fixit. As I noted here:
Yes, I will do that. But in other pull request. As I mentioned this patch does not resolve my issue. PS. I had desire to report about some method renaming and removing, about removing of some part of documentation and add doc for well formed methods (that were renamed). But I guess you will reject that as mine other proposal. So I threw out this idea. It's a pity. |
Um... the entire point of review/maintainership is to worry about things ;) This PR will end up with some code being merged. Without me actually reading through it I can't yet tell you how much will be taken as-is, and how much will be changed. I understand the eagerness of seeing your code go up on CPAN. But one needs to take into consideration the extraordinarily large footprint of this project. Due to this DBIC moves much slower than many other perl projects. All in all - patience please ;)
It is hard for me to definitively tell whether I would have accepted or rejected a particular change. The current philosophy is roughly
With the above in mind I urge you to open extra issues on RT (or alternatively discuss proposals on the IRC channel). What I definitely do not want to see is you sitting on a good idea because of a fear it will be rejected. IOW: |
|
I just do not want to troll with mine great ideas ))) |
Shrug... All I can say is that without the trolling you'll never find out if the ideas were truly great or not ;) Great to have a new pair of eyes going through the gnarly code in either case ;) |
|
what is RTs??? I will post all PRs I have. If I have time, I will continue to dig deeper (it will be usefull for description of internals). Lets continue our conversation after you return from YAPC ;-) Good Luck! PS. and your promise to give answer how to combine job and OpenSource. Do you remember my letter? ) |
RT stands for "Request Tracker" - the default (and often preferred bugtracker) used for CPAN projects. You have already opened several issues there, e.g. https://rt.cpan.org/Ticket/Display.html?id=104375. Each ssue is usually simply called They are also usually referred as |
|
ping |
|
@KES777 Haven't had a chance yet, I am sorry. Next day or so. |
|
no problem. Just the ping as you ask =) |
Test case for: http://search.cpan.org/~ribasushi/DBIx-Class-0.082820/lib/DBIx/Class/ResultSet.pm#create "Example of creating a new row and also creating rows in a related has_many or has_one resultse" When related row is autofilled by Related::new and depend on info of master/parent table this cause exception: died: Can't call method "name" on an undefined value at t/multi_create/create_related.t line 42, <> line 1. Because of master/parent row must be created before child/related row.
This reverts commit cb909f3.
|
Ok, so now that there is a test, I understand what you are after. Do I understand correctly that the code in this PR so far is just a cleanup, and does not in fact address the bug in question? Just want to make sure we are on the same page here... |
|
No. It is better to say: DBIx::Class::Relationship::Accessor; at line 57: To not return UNRESOLVABLE_CONDITION See detailed info here: https://rt.cpan.org/Public/Bug/Display.html?id=104375#txn-1495569 |
|
that have been fixed by me already if I understand the pointed crazy code |
|
ping |
|
@KES777 Pong. I have not forgotten this, but real-life intervened. It may be that I will not finish working on this until after YAPC::NA (2 weeks from now). Sorry for the delay, as I noted earlier this project moves slowly by design. |
|
No problem. I have saw that design so speed not surprise =) |
I personally have zero interest in a "radical perl6-like reimplementation". The current API (with all its deficiencies) is in wide use, as is perl itself. Thus nothing beyond incremental improvements is practical in my personal PoV. This doesn't mean I wouldn't like to see a different group attempt to do implement something different, and ultimately succeed at supplanting DBIC's use. It just definitively isn't something I am personally interested in pursuing. |
20b05dd
to
519c486
Compare
4bc1f7b
to
606ff39
Compare
f2e955c
to
1f99022
Compare
https://rt.cpan.org/Public/Bug/Display.html?id=104375