On Apr 18, 2007, at 7:37 PM, Michael Higgins wrote:

Hello, all --

I am trying to set up a simple relationship using schema.

Problem is, the database has column names like 'Invoice #' and 'Bill To'.

The error code for belongs_to and has_many is "no such column billto on
foreign class...".

This is true, of course. It has a space in the name.

How do I get DBIx::Class::Schema to look for the right column?

Any clue or example here greatly appreciated.

Others may be more helpful here, but those are terrible things to do in a database column name. Perhaps a refactoring would be better, if you are already moving twoards DBIx::Class?

Adam

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to