[Dbix-class] Search_rs not returning newly created rows

Kenneth S Mclane ksmclane at us.ibm.com
Tue Jun 19 18:58:16 GMT 2012


Moritz Lenz <moritz at faui2k3.org> wrote on 06/19/2012 01:16:42 PM:

> From:
> 
> Moritz Lenz <moritz at faui2k3.org>
> 
> To:
> 
> dbix-class at lists.scsys.co.uk
> 
> Date:
> 
> 06/19/2012 01:20 PM
> 
> Subject:
> 
> Re: [Dbix-class] Search_rs not returning newly created rows
> 
> On 06/19/2012 05:27 PM, Kenneth S Mclane wrote:
> > I have succeeded in creating a new row in my table with "->create". I
> > then go back to my page that lists all the rows in that table, and I 
get
> > the list using "search_rs", but the newly created rows are not 
showing.
> > I verified that the rows do exist. I'm not sure why this isn't 
working.
> 
> Maybe an uncommitted transaction somewhere?
> Does your database have the facility to list open transactions? If yes,
> do that while the program is running; maybe you'll find something of
> interest.
> 
> Cheers,
> Moritz
> 
It looks like it is because of the relationships limiting the rows 
returned. I can comment out the prefetch statement and my extra rows 
actually show up. In one case this works fine, in another it causes the 
search to fail. I think I may need to create a second rs with just the 
related data so if I get a null value I can bypass it. Not sure exactly 
how to do this and keep the data straight.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120619/f1083474/attachment.htm


More information about the DBIx-Class mailing list