Moritz Lenz <[email protected]> wrote on 06/19/2012 01:16:42 PM:
> From: > > Moritz Lenz <[email protected]> > > To: > > [email protected] > > 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.
_______________________________________________ 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/[email protected]
