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

adjust code, support situation as describe flowing #2

Merged
merged 1 commit into from Jun 26, 2013

Conversation

ChinaXing
Copy link
Contributor

when query use with like :

MySchema::Person->find(
         $dbh => { where => [ name => "jack" ] => with => [qw/book book.author/] => sub { });

where Person may( may not ) has many book. each book has a author.

the query result will be :

     #Person         Book              Author
    Jack China      bookA 20$      Jucy American
    Jim Canada     undef  undef    undef undef

we can see that some people like Jim haven't a book --- the query result "undef";

this situation will trigger the code in Async::ORM::_map_row_to_object "die";

when it checking the subwith : book, but it wouldn't be set( because of the undef).

I think we should do not check the empty as an error.

when empty, means the related table's result is null.

hope you can consider it :) thanks !

vti pushed a commit that referenced this pull request Jun 26, 2013
adjust code, support situation as describe flowing
@vti vti merged commit 8ed3d24 into vti:master Jun 26, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants