[Jifty-commit] r3599 - in jifty/branches/virtual-models: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jul 2 11:25:32 EDT 2007
Author: sterling
Date: Mon Jul 2 11:25:30 2007
New Revision: 3599
Modified:
jifty/branches/virtual-models/ (props changed)
jifty/branches/virtual-models/lib/Jifty/Handle.pm
Log:
r7924 at dynpc145: andrew | 2007-07-02 10:19:05 -0500
Added code to handle loading DB-backed models and model columns during lookup_record().
Modified: jifty/branches/virtual-models/lib/Jifty/Handle.pm
==============================================================================
--- jifty/branches/virtual-models/lib/Jifty/Handle.pm (original)
+++ jifty/branches/virtual-models/lib/Jifty/Handle.pm Mon Jul 2 11:25:30 2007
@@ -411,6 +411,17 @@
my ($record_class) = grep { $_->table eq $table }
Jifty->class_loader->models;
+ # If still not defined, check to see if this is ModelClass/ModelClassColumn
+ # XXX Should these be placed in Jifty->class_load->models? -- sterling
+ if (not defined $record_class) {
+ if ($table eq '_jifty_models') {
+ $record_class = 'Jifty::Model::ModelClass';
+ }
+ elsif ($table eq '_jifty_modelcolumns') {
+ $record_class = 'Jifty::Model::ModelClassColumn';
+ }
+ }
+
return unless defined $record_class;
# Only return a value when load succeeds
More information about the Jifty-commit
mailing list