[Dbix-class] Quoting table aliases

Dmitri Bichko dbichko at aveopharma.com
Fri Mar 10 13:56:29 CET 2006


Hi,

Would it be possible to have DBIx::Class always quote all table
identifiers to avoid namespace conflicts?

For example, here's the SQL generated for a many-to-many relationship I
have:

SELECT group.group_id, group.type, group.name, group.description FROM
categories me JOIN groups group ON ( group.group_id = me.group_id )
WHERE ( me.sample_id =  58471)

Since group is a database keyword, Postgres doesn't like it. Easy to
work around in this case, but is there a reason NOT to add the quotes?
I guess another way to do it would be to add a DBIC-specific prefix to
the autogenerated table aliases.

Thanks,
Dmitri
PS Just wanted to say Thank You for DBIC - after years of headaches with
Class::DBI, it's just a pleasure to work with.
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer



More information about the Dbix-class mailing list