On 17 May 2011 15:22, Bill Moseley <[email protected]> wrote:

>
>> I have two databases that are very similar.  For example, the "person"
>> table in one db has an "email" column and the other does not have that
>> column, otherwise the tables are the same.
>> ...
>>
>> My question is what can I do to make get_column and create (and other
>> methods that assume there is an "email" column) work without this column
>> defined in the result class.  Is there any way to have define a column that
>> is never used when constructing database queries?
>>
>>
>>
Can you say

my $search_attr = {
  '+columns'  => [ { 'email' => \'' } ], # and so on for other missing
fields
};

then

my $rs = $schema->search_rs( $query, $search_attr );


Regards, Peter
http://perl.dragonstaff.co.uk
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to