[Dbix-class] get_columns/get_inflated_columns
Christopher H. Laco
claco at chrislaco.com
Tue May 22 01:03:14 GMT 2007
Matt S Trout wrote:
> On Mon, May 21, 2007 at 01:32:27PM -0400, Christopher H. Laco wrote:
>>> Sure, but it has to obey ->{accessor} (and you'll need to patch inflate=
_column
>>> to while you're there) and there'll need to be tests.
>> return map {$_ =3D> $self->$_} $self->columns;
>>
>> Why do I have to patch inflate_column or care if I'm using the accessor?
> =
> the $self->$_ may not be correct. accessor name may not match column name.
> =
> column_info accessor key determines this for column accessor; inflate_col=
umn
> should obey this but I don't think currently does.
> =
>>> Oh, and how do you propose to handle people wanting rels as well?
>> I don't, just like get_columns doesn't.
>>
>>> Or non-column attributes? (c.f. Oleg's horrible hack because he wanted =
to
>>> use get_columns on non-column things)
>>>
>> I don't, just like get_columns doesn't.
>>
>>
>> I'm proposing that get_inflated_columns is no smarter than get_columns
>> or than I get the objects instead of their values...
> =
> Well, fair enough, but you're putting fuel on the fire of ::Core getting
> deprecated entirely in favour of something that doesn't need hacks like t=
his.
> =
Done. get_inflated_columns in Row with tests for {accessor}, inflated
objects (DateTime) and relationship where the rel acccessor is the same
name as the field (track.cd vs. 'cd' accessor )...
I have not touched inflate_column, or anything else we thing is
{accessor} broken until I understand better what wrong is...
-=3DChris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070521/08=
df3972/signature.pgp
More information about the Dbix-class
mailing list