My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 10: implicit join syntax in where clause
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  funnyso...@gmail.com
Closed:  Jun 2009
Cc:  sdmo...@gmail.com


 
Reported by funnyso...@gmail.com, Jun 9, 2009
Instead of something like:

my $japan_id = $dbrh->country->where( name => 'Japan' )->next->country_id;
my $makes = $dbrh->make->where( country_id => $japan_id );
my $models = $dbrh->model->where( make_id => scalar $makes->values(
'make_id' ) );
my $cars = $dbrh->car->where( model_id => scalar $models->values(
'model_id' ) );

we'd much prefer:

my $cars = $dbrh->car->where( 'model.make.country.name' => 'Japan' );

just as we can currently say:

print "Made in: " . $car->model->make->country->name . "\n";

Jun 12, 2009
#1 daniel.d...@gmail.com
Done and done... but it needs more testing.
Have at it and let me know if you can break it.

Also... try to keep an eye on the SQL and make sure that's sane if you can.
Status: Fixed
Cc: sdmoses

Powered by Google Project Hosting