From: Rafael Kitover Date: Thu, 6 Aug 2009 13:48:54 +0000 (+0000) Subject: Merge 'trunk' into 'table_name_ref' X-Git-Tag: v0.08109~29^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ca5c92b53be82e8898c2da3dda0cb5e5cde5674;p=dbsrgits%2FDBIx-Class.git Merge 'trunk' into 'table_name_ref' r9068@hlagh (orig r7198): caelum | 2009-08-04 16:18:27 -0400 update Changes r9075@hlagh (orig r7205): ribasushi | 2009-08-05 02:34:25 -0400 Bump dependencies: Test::More for the new no_plan/done_testing goodies File::Temp as per RT#48431 r9077@hlagh (orig r7207): ribasushi | 2009-08-05 02:36:32 -0400 r7156@Thesaurus (orig r7153): robkinyon | 2009-07-30 20:06:04 +0200 Create prefetch_redux branch r7164@Thesaurus (orig r7161): robkinyon | 2009-07-31 22:41:01 +0200 Added MooseX::Traits to Makefile.PL r7172@Thesaurus (orig r7169): robkinyon | 2009-08-03 05:49:59 +0200 Added two tests and marked one todo_skip r7187@Thesaurus (orig r7184): ribasushi | 2009-08-03 17:24:41 +0200 Use goto to preserve correct error-at-line reporting r7189@Thesaurus (orig r7186): ribasushi | 2009-08-04 12:34:58 +0200 Add an extra test specifically for distinct/prefetch Remove duplicate test in count/prefetch Switch to as_query instead of debug overloading r7190@Thesaurus (orig r7187): ribasushi | 2009-08-04 12:35:57 +0200 Fix how a distinct-induced group_by is calculated, taking in consideration the new prefetch mechanism r7197@Thesaurus (orig r7194): ribasushi | 2009-08-04 17:31:33 +0200 Traits not needed by anything currently in dbic r7198@Thesaurus (orig r7195): ribasushi | 2009-08-04 17:41:14 +0200 Move around tests a bit r7199@Thesaurus (orig r7196): mo | 2009-08-04 21:10:57 +0200 prefetch-grouped fails, again r7204@Thesaurus (orig r7201): ribasushi | 2009-08-04 22:50:51 +0200 Split the search_related prefetch tests into a standalone testfile r7205@Thesaurus (orig r7202): ribasushi | 2009-08-04 23:05:03 +0200 Move norbi's test to prefetch_redux - it's the same idea r7209@Thesaurus (orig r7206): ribasushi | 2009-08-05 08:35:48 +0200 Tadaaaa (even more prefetch insanity) r9079@hlagh (orig r7209): ribasushi | 2009-08-05 02:38:41 -0400 r7107@Thesaurus (orig r7104): caelum | 2009-07-24 06:51:57 +0200 new branch to move common mssql functionality into the base class, and other tweaks r7109@Thesaurus (orig r7106): caelum | 2009-07-24 07:28:11 +0200 moved code to ::DBI::MSSQL and added DT inflation test r7112@Thesaurus (orig r7109): caelum | 2009-07-24 08:46:16 +0200 merge in some more MSSQL code, including odbc dynamic cursor support r7113@Thesaurus (orig r7110): caelum | 2009-07-24 08:49:54 +0200 fix a warning in SQLAHacks r7114@Thesaurus (orig r7111): caelum | 2009-07-24 09:22:33 +0200 add placeholder support detection for mssql through dbd::sybase r7118@Thesaurus (orig r7115): caelum | 2009-07-24 16:39:06 +0200 minor doc clarification r7122@Thesaurus (orig r7119): caelum | 2009-07-25 16:10:30 +0200 move placeholder support detection into ::Sybase::Base r7123@Thesaurus (orig r7120): caelum | 2009-07-25 16:12:01 +0200 add a comment r7127@Thesaurus (orig r7124): caelum | 2009-07-26 18:04:29 +0200 SAVEPOINT methods for MSSQL r7140@Thesaurus (orig r7137): caelum | 2009-07-30 10:12:45 +0200 better tests for "smalldatetime" support in MSSQL r7142@Thesaurus (orig r7139): caelum | 2009-07-30 13:29:19 +0200 MSSQL GUID support r7147@Thesaurus (orig r7144): caelum | 2009-07-30 15:38:33 +0200 update sqlite test schema r7150@Thesaurus (orig r7147): caelum | 2009-07-30 16:26:47 +0200 make sure the new mssql insert method works on an un-reblessed storage r7151@Thesaurus (orig r7148): caelum | 2009-07-30 16:55:35 +0200 better rebless check for insert r7154@Thesaurus (orig r7151): caelum | 2009-07-30 18:57:22 +0200 add missing file r7155@Thesaurus (orig r7152): caelum | 2009-07-30 19:00:40 +0200 fix syntax error r7163@Thesaurus (orig r7160): caelum | 2009-07-31 15:52:41 +0200 fix a bug in _determine_driver r7166@Thesaurus (orig r7163): caelum | 2009-08-01 18:10:23 +0200 default collist for storage _resolve_column_info r7182@Thesaurus (orig r7179): caelum | 2009-08-03 13:42:31 +0200 check that dynamic cursors are functional if enabled r7184@Thesaurus (orig r7181): ribasushi | 2009-08-03 14:23:37 +0200 Adjust expected sql to match the new 'Track' table definition r7186@Thesaurus (orig r7183): ribasushi | 2009-08-03 15:16:10 +0200 Simplify code and add some comments r7200@Thesaurus (orig r7197): caelum | 2009-08-04 21:31:16 +0200 update oracle tests for new "track" table r7203@Thesaurus (orig r7200): caelum | 2009-08-04 22:39:57 +0200 update Changes r9081@hlagh (orig r7211): ribasushi | 2009-08-05 02:40:39 -0400 r7213@Thesaurus (orig r7210): ribasushi | 2009-08-05 08:40:20 +0200 Really sanify _resolve_column_info r9083@hlagh (orig r7213): ribasushi | 2009-08-05 04:19:37 -0400 Reminder about discard_changes and friends r9084@hlagh (orig r7214): ribasushi | 2009-08-05 04:26:20 -0400 Reformat and fill-in changes r9085@hlagh (orig r7215): caelum | 2009-08-05 04:37:12 -0400 rename connect_call_use_mars to connect_call_use_MARS r9086@hlagh (orig r7216): ribasushi | 2009-08-05 04:38:14 -0400 Silence a TODO test r9087@hlagh (orig r7217): caelum | 2009-08-05 04:46:11 -0400 minor Changes update r9097@hlagh (orig r7227): castaway | 2009-08-05 08:57:52 -0400 Minty's conversion of cookbook "arbitrary sql" to use ResultSource::View, plus some examples in ::View itself. Some style tweaks of mine r9098@hlagh (orig r7228): ribasushi | 2009-08-05 09:41:28 -0400 Dynamically load necessary table classes r9103@hlagh (orig r7233): caelum | 2009-08-05 13:49:51 -0400 fix rounding issues in mssql money tests r9104@hlagh (orig r7234): caelum | 2009-08-05 14:09:03 -0400 better money value comparison in tests r9106@hlagh (orig r7236): frew | 2009-08-05 14:53:32 -0400 whitespace jfklds;ajfklds;a r9107@hlagh (orig r7237): frew | 2009-08-05 14:54:41 -0400 Fix testing bug. Windows only. --- 6ca5c92b53be82e8898c2da3dda0cb5e5cde5674 diff --cc lib/DBIx/Class/ResultSourceProxy/Table.pm index b39e0b6,929c300..db82b47 --- a/lib/DBIx/Class/ResultSourceProxy/Table.pm +++ b/lib/DBIx/Class/ResultSourceProxy/Table.pm @@@ -76,9 -76,12 +79,13 @@@ Gets or sets the table name sub table { my ($class, $table) = @_; return $class->result_source_instance->name unless $table; - unless (ref $table) { + + unless (Scalar::Util::blessed($table) && $table->isa($class->table_class)) { - $table = $class->table_class->new({ + + my $table_class = $class->table_class; + $class->ensure_class_loaded($table_class); + + $table = $table_class->new({ $class->can('result_source_instance') ? %{$class->result_source_instance||{}} : (), name => $table,