From: Matt S Trout Date: Sun, 29 Jul 2007 18:26:43 +0000 (+0000) Subject: clarified last_insert_id usage X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a6a36f8551e7f34cdb45b8e68444878267d41f7;p=dbsrgits%2FDBIx-Class-Historic.git clarified last_insert_id usage --- diff --git a/lib/DBIx/Class/JDBICompat/Handle.pm b/lib/DBIx/Class/JDBICompat/Handle.pm index 9043ac4..d41010f 100755 --- a/lib/DBIx/Class/JDBICompat/Handle.pm +++ b/lib/DBIx/Class/JDBICompat/Handle.pm @@ -338,7 +338,12 @@ sub insert { warn $@; return undef; } - return $storage->last_insert_id($source, 'id'); # XXX TODO. HARDCODED THE ID. CAN WE NOT GET THIS FROM THE $source? + return $storage->last_insert_id($source, 'id'); # XXX TODO. HARDCODED THE ID. SEE BELOW. + # we can get this from the source, but you'll end up re-implementing the + # logic currently embedded in Row's insert method. Factoring this out would + # probably be ok, but I figure we'll probably move Record over to using + # the Row code or something before that so fine for now? (maybe post-09 + # when this stuff is encapulated in source entirely is good?) } =head2 update_record_value