From melutovich at gmail.com Fri Dec 9 09:44:28 2022 From: melutovich at gmail.com (Mitchell Elutovich) Date: Fri, 9 Dec 2022 11:44:28 +0200 Subject: [Dbix-class] unexpected behavior using select with inflate_result Message-ID: I wrote some code similar to: my $row = $self->search_related('xyzes', {}, { select => "colABC", as => "colABC" }->first(); xyzes is of type XYZ Because of the "select", I was not expecting inflate_result on XYZ to be called, however it is. -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve at matsch.com Fri Dec 9 13:34:45 2022 From: steve at matsch.com (Steve) Date: Fri, 9 Dec 2022 08:34:45 -0500 Subject: [Dbix-class] DBIx-Class Digest, Vol 176, Issue 1 In-Reply-To: References: Message-ID: <64962d43-a7a6-71b0-2cb7-9aaf8568adac@matsch.com> If you use the convention: my $value = $row->colABC, then you'll get the inflated value, provided the column is defined as an object.? If you want the raw value, ask for $row->get_column('colABC'). On 12/9/2022 7:00 AM, dbix-class-request at lists.scsys.co.uk wrote: > Send DBIx-Class mailing list submissions to > dbix-class at lists.scsys.co.uk > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > or, via email, send a message with subject or body 'help' to > dbix-class-request at lists.scsys.co.uk > > You can reach the person managing the list at > dbix-class-owner at lists.scsys.co.uk > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of DBIx-Class digest..." > > > Today's Topics: > > 1. unexpected behavior using select with inflate_result > (Mitchell Elutovich) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 9 Dec 2022 11:44:28 +0200 > From: Mitchell Elutovich > Subject: [Dbix-class] unexpected behavior using select with > inflate_result > To: "DBIx::Class user and developer list" > > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > I wrote some code similar to: > > my $row = $self->search_related('xyzes', {}, { select => "colABC", as => > "colABC" }->first(); > > xyzes is of type XYZ > > Because of the "select", I was not expecting inflate_result on XYZ to be > called, however it is. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > DBIx-Class mailing list > DBIx-Class at lists.scsys.co.uk > http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > > > End of DBIx-Class Digest, Vol 176, Issue 1 > ****************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: