[Dbix-class] name collision
Christopher H. Laco
claco at chrislaco.com
Thu Jul 3 21:41:23 BST 2008
Jeremy J. Koch wrote:
> I have the luck of a table with a column named "source_name".
> =
> This of course results in a hilarious situation:
> DBIx::Class::Row::get_column(): Can't fetch data as class method at (eval=
6724)
> =
> Normally I would take the easy route and rename the column. Unfortunatel=
y =
> the schema is defined by a proprietary application I am integrating with =
so
> this is not an option. The only solution I could come up with was to omit
> "source_name" column from the schema class. Then to use +select with +as
> resultset attributes to specify an a different name for the column. =
> =
> Any thoughts? Have I overlooked a simpler solution?
> =
> Thank you,
> -Jeremy
Have you tried setting the accessor key of the column_info for that column?
I wonder if this is a column name collision, or just that code is trying =
to access ->source_name at a higher level....
-=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/20080703/c5=
ca510e/signature.pgp
More information about the DBIx-Class
mailing list