Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 105650
Status: open
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: unclear documentation, do not understand how to fetch last insert id
Download (untitled) / with headers
text/plain 298b
Download (untitled) / with headers
text/plain 1.3k
On Fri Jul 03 19:03:07 2015, kes-kes@yandex.ru wrote: Show quoted text
> This page > http://search.cpan.org/~ribasushi/DBIx-Class- > 0.082820/lib/DBIx/Class/PK/Auto.pm > > MUST have link to this: > http://search.cpan.org/~jrobinson/DBIx-Class-Tutorial- > 0.0001/lib/DBIx/Class/Tutorial/Part3.pod#Dealing_with_Primary_Keys
Actually this link is factually incorrect - most backends avoid using the direct call to DBI ( https://metacpan.org/pod/DBI#last_insert_id ). Instead depending on backend various ways exist ensuring that at least a PK will be retrieved on any ->insert() operation. There is a (incomplete) mention of things here: https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod#Getting-the-value-of-the-primary-key-for-the-last-database-insert There is also a discussion of what "primary key" means in DBIC-terms here: https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Intro.pod#The-Significance-and-Importance-of-Primary-Keys Lastly - there is a general guard ensuring that the PK is always present in some form: https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082820/lib/DBIx/Class/Storage/DBI.pm#L1989-1997 Show quoted text
> Also, I think you must have this link at ::Row documentation
Do you think you can come up with a patch that amalgamates all this info and puts it in some obvious places? Thanks in advance!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.