Am 20.07.2008 um 02:53 schrieb Matt S Trout:
On Tue, Jul 08, 2008 at 09:47:50AM +0200, Moritz Onken wrote:Hi,sorry for the repost, but there was no answer to my previous post.And yet you provided no new information to help us diagnose the problem. Hint: If you get no answer it usually means nobody could work out what answer you were expecting. -Always- include more info with a repost.Though as I said in reply to the previous post, try trunk. If that doesn't work, I'm sure there's a test somewhere - see why it's passing and yourcode isn't working ...
I've put together a test case. I tried trunk (0.08) but had no luck. Unpack the attachment and run "perl complex01.t". If you have DBIC_TRACE enabled you'll see something like this: [lots of inserts and creates and sql stuff]SELECT me.title, me.id, parents.child, parents.parent, parent.title, parent.id FROM complex me LEFT JOIN complex_map parents ON ( parents.child = me.id ) LEFT JOIN complex parent ON ( parent.id = parents.parent ) WHERE ( ( me.id = ? ) ) ORDER BY parents.child: '3'
# which is fine because it prefetches all data it should needSELECT me.child, me.parent FROM complex_map me WHERE ( me.child = ? ): '3'
# this data is already loaded! SELECT me.title, me.id FROM complex me WHERE ( ( ( me.id = ? ) ) ): '1' # this one too ok 1 Thanks for any advice. cheers, moritz
test4list.tgz
Description: Binary data
_______________________________________________ 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]