You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my $db = MyApp::DB->new(
...,
lint => 1, # 0=ignored, 1=show warning, 2=throw exception
);
# (STDERR) You should specify `table_name` option at $file line $line.
$db->select_by_sql(q{
SELECT
user.*
FROM
user_item
INNER JOIN user
ON user.id = user_item.user_id
WHERE
user_item.item_id = 1
});
# (STDERR) Detected N+1 Problem, you should use `prefetch` option.
$db->txn_do(sub {
my @user_item = $db->select(user_item => { item_id => 1 })->all;
for my $user_item (@user_item) {
my $user = $user_item->user; # or $db->select(user => { id => $user_item->user_id });
# ...
}
});
The text was updated successfully, but these errors were encountered:
detect bad code and show warnings.
The text was updated successfully, but these errors were encountered: