I though distinct was broken in current since existing passing tests wenbt to hell last night...
As it turned out, it may be populate instead...
Did populate change lately?
Here's my code, and this is what DBIC-TRACE spits out:
They don't jive... at all...
Which explains my failing tests...
> $schema->populate('Users', [
> [ qw/id username password created updated/ ],
> [1,'test1','password1',$date,$date],
> [2,'test2','password2',$date,$date],
> [3,'test3','password3',$date,$date],
> ]);
>
> $schema->populate('Roles', [
> [ qw/id name description created updated/ ],
> [1,'role1','Role1',$date,$date],
> [2,'role2','Role2',$date,$date],
> ]);
>
> $schema->populate('UsersRoles', [
> [ qw/user_id role_id/ ],
> [1,1],
> [1,2],
> [2,1],
> ]);
>
> $schema->populate('Profiles', [
> [ qw/id user_id first_name last_name created updated/ ],
> [1,1,'First1', 'Last1',$date,$date],
> [2,2,'First2', 'Last2',$date,$date],
> ]);
>
> $schema->populate('Carts', [
> [ qw/id user_id created updated/ ],
> [1,1,$date,$date],
> [2,undef,$date,$date],
> ]);
>
> $schema->populate('CartItems', [
> [ qw/id cart_id sku quantity price description created updated/ ],
> [1,1,'ABC-123',1,1.11,'SKU1',$date,$date],
> [2,1,'DEF-345',2,2.22,'SKU2',$date,$date],
> [3,2,'GHI-678',3,3.33,'SKU3',$date,$date],
> ]);
>
> $schema->populate('Wishlists', [
> [ qw/id user_id name description created updated/ ],
> [1,1,'Wishlist1','First Wishlist',$date,$date],
> [2,1,'Wishlist2','Second Wishlist',$date,$date],
> [3,2,'Wishlist3','Third Wishlist',$date,$date],
> ]);
>
> $schema->populate('WishlistItems', [
> [ qw/id wishlist_id sku quantity description created updated/ ],
> [1,1,'WABC-123',1,'WSKU1',$date,$date],
> [2,1,'WDEF-345',2,'WSKU2',$date,$date],
> [3,2,'WGHI-678',3,'WSKU3',$date,$date],
> ]);
>
> $schema->populate('Orders', [
> [ qw/id user_id type billtofirstname billtolastname billtoaddress1
> billtoaddress2 billtoaddress3 billtocity billtostate billtozip billtocountry
> billtodayphone billtonightphone billtofax billtoemail comments created
> handling number shipmethod shipping shiptosameasbillto shiptofirstname
> shiptolastname shiptoaddress1 shiptoaddress2 shiptoaddress3 shiptocity
> shiptostate shiptozip shiptocountry shiptodayphone shiptonightphone shiptofax
> shiptoemail subtotal total updated tax/ ],
>
> [1,1,0,'Christopher','Laco','BillToAddress1','BillToAddress2','BillToAddress3','BillToCity','BillToState','BillToZip','BillToCountry','1-111-111-1111','2-222-222-2222','3-333-333-3333','[EMAIL
> PROTECTED]','Comments',$date,8.95,'O123456789','UPS
> Ground',23.95,0,'Christopher','Laco','ShipToAddress1','ShipToAddress2','ShipToAddress3','ShipToCity','ShipToState','ShipToZip','ShipToCountry','4-444-444-4444','5-555-555-5555','6-666-666-6666','[EMAIL
> PROTECTED]',5.55,37.95,$date, 6.66],
>
> [2,1,1,'Christopher','Laco','BillToAddress1','BillToAddress2','BillToAddress3','BillToCity','BillToState','BillToZip','BillToCountry','1-111-111-1111','2-222-222-2222','3-333-333-3333','[EMAIL
> PROTECTED]','Comments',$date,8.95,'O123456789','UPS
> Ground',23.95,0,'Christopher','Laco','ShipToAddress1','ShipToAddress2','ShipToAddress3','ShipToCity','ShipToState','ShipToZip','ShipToCountry','4-444-444-4444','5-555-555-5555','6-666-666-6666','[EMAIL
> PROTECTED]',5.55,37.95,$date, 6.66],
>
> [3,2,1,'Christopher','Laco','BillToAddress1','BillToAddress2','BillToAddress3','BillToCity','BillToState','BillToZip','BillToCountry','1-111-111-1111','2-222-222-2222','3-333-333-3333','[EMAIL
> PROTECTED]','Comments',$date,8.95,'O123456789','UPS
> Ground',23.95,0,'Christopher','Laco','ShipToAddress1','ShipToAddress2','ShipToAddress3','ShipToCity','ShipToState','ShipToZip','ShipToCountry','4-444-444-4444','5-555-555-5555','6-666-666-6666','[EMAIL
> PROTECTED]',5.55,37.95,$date, 6.66]
> ]);
>
> $schema->populate('OrderItems', [
> [ qw/id order_id sku quantity price total description created
> updated/ ],
> [1,1,'SKU1111',1,1.11,0,'Line Item SKU 1',$date,$date],
> [2,1,'SKU2222',2,2.22,0,'Line Item SKU 2',$date,$date],
> [3,2,'SKU3333',3,3.33,0,'Line Item SKU 3',$date,$date],
> [4,3,'SKU4444',4,4.44,0,'Line Item SKU 4',$date,$date],
> [5,3,'SKU1111',5,5.55,0,'Line Item SKU 5',$date,$date]
> ]);
>
> $schema->populate('Products', [
> [ qw/id sku name description price created updated/ ],
> [1,'SKU1111','SKU 1','My SKU 1',1.11,$date,$date],
> [2,'SKU2222','SKU 2','My SKU 2',2.22,$date,$date],
> [3,'SKU3333','SKU 3','My SKU 3',3.33,$date,$date],
> ]);
>
> $schema->populate('ProductAttributes', [
> [ qw/id product_id name value created updated/ ],
> [1,1,'Attribute1','Value1',$date,$date],
> [2,1,'Attribute2','Value2',$date,$date],
> [3,3,'Attribute3','Value3',$date,$date],
> ]);
>
> $schema->populate('Tags', [
> [ qw/id name created updated/ ],
> [1,'Tag1',$date,$date],
> [2,'Tag2',$date,$date],
> [3,'Tag3',$date,$date],
> [4,'Tag4',$date,$date],
> ]);
>
> $schema->populate('ProductTags', [
> [ qw/product_id tag_id/ ],
> [1,1],
> [1,2],
> [3,3],
> ]);
> INSERT INTO user (created, id, password, updated, username) VALUES (?, ?, ?,
> ?, ?): 3, 0, 2, 4, 1
> INSERT INTO role (created, description, id, name, updated) VALUES (?, ?, ?,
> ?, ?): 3, 2, 0, 1, 4
> INSERT INTO user_role (role_id, user_id) VALUES (?, ?): 1, 0
> INSERT INTO profile (created, first_name, id, last_name, updated, user_id)
> VALUES (?, ?, ?, ?, ?, ?): 4, 2, 0, 3, 5, 1
> INSERT INTO cart (created, id, updated, user_id) VALUES (?, ?, ?, ?): 2, 0,
> 3, 1
> INSERT INTO cart_item (cart_id, created, description, id, price, quantity,
> sku, updated) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
> : 1, 6, 5, 0, 4, 3, 2, 7
> INSERT INTO wishlist (created, description, id, name, updated, user_id)
> VALUES (?, ?, ?, ?, ?, ?): 4, 3, 0, 2, 5, 1
> INSERT INTO wishlist_item (created, description, id, quantity, sku, updated,
> wishlist_id) VALUES (?, ?, ?, ?, ?, ?, ?):
> 5, 4, 0, 3, 2, 6, 1
> INSERT INTO orders (billtoaddress1, billtoaddress2, billtoaddress3,
> billtocity, billtocountry, billtodayphone, billtoema
> il, billtofax, billtofirstname, billtolastname, billtonightphone,
> billtostate, billtozip, comments, created, handling, i
> d, number, shipmethod, shipping, shiptoaddress1, shiptoaddress2,
> shiptoaddress3, shiptocity, shiptocountry, shiptodaypho
> ne, shiptoemail, shiptofax, shiptofirstname, shiptolastname,
> shiptonightphone, shiptosameasbillto, shiptostate, shiptozi
> p, subtotal, tax, total, type, updated, user_id) VALUES (?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?): 5, 6, 7, 8, 11, 12,
> 15, 14, 3, 4, 13, 9, 10, 16, 17, 18, 0, 19
> , 20, 21, 25, 26, 27, 28, 31, 32, 35, 34, 23, 24, 33, 22, 29, 30, 36, 39, 37,
> 2, 38, 1
> INSERT INTO order_item (created, description, id, order_id, price, quantity,
> sku, total, updated) VALUES (?, ?, ?, ?, ?,
> ?, ?, ?, ?): 7, 6, 0, 1, 4, 3, 2, 5, 8
> INSERT INTO product (created, description, id, name, price, sku, updated)
> VALUES (?, ?, ?, ?, ?, ?, ?): 5, 3, 0, 2, 4, 1
> , 6
> INSERT INTO product_attribute (created, id, name, product_id, updated, value)
> VALUES (?, ?, ?, ?, ?, ?): 4, 0, 2, 1, 5,
> 3
> INSERT INTO tag (created, id, name, updated) VALUES (?, ?, ?, ?): 2, 0, 1, 3
> INSERT INTO product_tag (product_id, tag_id) VALUES (?, ?): 0, 1
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
