[Jifty-commit] r1252 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jun 11 01:05:11 EDT 2006
Author: clkao
Date: Sun Jun 11 01:05:10 2006
New Revision: 1252
Modified:
jifty/trunk/lib/Jifty/Record.pm
Log:
The short-circuit of primary_key wasn't actually usable.
Play tricks on ->_primary_key and ->id instead.
Modified: jifty/trunk/lib/Jifty/Record.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Record.pm (original)
+++ jifty/trunk/lib/Jifty/Record.pm Sun Jun 11 01:05:10 2006
@@ -84,14 +84,15 @@
}
-=head2 primary_key
+=head2 id
-Returns the default primary key for record columns: 'id'.
+Returns the record id value.
This routine short-circuits a much heavier call up through Jifty::DBI
=cut
-sub primary_key {'id'}
+sub _primary_key { 'id' }
+sub id { $_[0]->{'values'}->{'id'} }
=head2 load_or_create
More information about the Jifty-commit
mailing list