[Dbix-class] can't get last insert id on create() with mysql
Robert Stockdale
robert.stockdale at gmail.com
Mon Nov 30 21:46:44 GMT 2009
Here is the create table statement:
CREATE TABLE IF NOT EXISTS `STORY` (
`ID` int(15) NOT NULL auto_increment,
`CREATE_DATE` timestamp NOT NULL default CURRENT_TIMESTAMP,
`NAME` varchar(140) NOT NULL,
`DESCRIPTION` longtext,
`CREATOR_ID` varchar(15) NOT NULL,
PRIMARY KEY (`ID`,`CREATE_DATE`),
);
It is keyed on ID and CREATE_DATE to allow for multiple revisions of the
same story.
I don't have a test case yet and I am not that familiar with DBI, but I'll
work on a pure DBI test case and see if I can get it working and then I'll
post back.
Thanks,
-Bob
On Wed, Nov 25, 2009 at 8:15 AM, Rob Kinyon <rob.kinyon at gmail.com> wrote:
> On Tue, Nov 24, 2009 at 17:39, Robert Stockdale
> <robert.stockdale at gmail.com> wrote:
> > The transactional approach with the subquery is working just fine but if
> > anyone has thoughts on how I can get the auto-increment to work I would
> love
> > to hear them.
>
> What's the full CREATE TABLE statement for this table? Do you have a
> minimal testcase demonstrating the behavior using pure DBI?
>
> Rob
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
>
-- =
Bob Stockdale
robert.stockdale at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20091130/9b2=
ffdf4/attachment.htm
More information about the DBIx-Class
mailing list