I have a database table -- let's call it 'Contacts' that I'm accessing through a DBIx::Class model. This table has two fields called 'first_name' and 'last_name'.

Could I get some suggestion on the best way to add code to the model (or the schema) to allow me to add a custom field to the resultset without having an actual column in the database table? I want to be able to access a field in the resultset called something like 'common_name'. This field would contain a concatenation of the first and last name fields for people and only the data from the last name for other entities like businesses.

Thanks!

Greg Coates

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to