Skip to content

Instantly share code, notes, and snippets.

@SysPete
Created May 2, 2014 09:37
Show Gist options
  • Save SysPete/e39097e42e006ba4e1ad to your computer and use it in GitHub Desktop.
Save SysPete/e39097e42e006ba4e1ad to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Test::More;
use Test::DBIx::Class {
schema_class => 'Interchange6::Schema',
traits => 'Testpostgresql',
resultsets => [ qw/ Order User / ],
};
fixtures_ok [
User => [
[qw/username email password first_name last_name active/],
[qw/[email protected] [email protected] password Example User 1/],
],
Country => [
[qw/country_iso_code/],
[qw/US/],
],
Address => [
[qw/users_id country_iso_code/],
[qw/1 US/],
],
Order => [
[qw/order_number order_date users_id shipping_addresses_id billing_addresses_id/],
[qw/123 2014-01-01 1 1 1/],
],
], 'Installed fixtures';
my $rset = Schema->resultset('Order')->search(
{},
{
prefetch => 'User',
}
);
my $result = $rset->next;
done_testing;
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: syntax error at or near "."
LINE 1: ...dling, me.salestax, me.total_cost, me.status, User.users_id,...
^ [for Statement "SELECT me.orders_id, me.order_number, me.order_date, me.users_id, me.email, me.shipping_addresses_id, me.billing_addresses_id, me.weight, me.payment_method, me.payment_number, me.payment_status, me.shipping_method, me.subtotal, me.shipping, me.handling, me.salestax, me.total_cost, me.status, User.users_id, User.username, User.nickname, User.email, User.password, User.first_name, User.last_name, User.last_login, User.created, User.last_modified, User.active FROM orders me JOIN users User ON User.users_id = me.users_id"] at ic6_schema_user_issue.t line 36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment