<br><br><div class="gmail_quote">On Tue, May 17, 2011 at 7:43 AM, Peter Edwards <span dir="ltr">&lt;<a href="mailto:peter@dragonstaff.co.uk">peter@dragonstaff.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="gmail_quote"><div>Can you say</div><div><br></div><div>my $search_attr = {</div><div>  &#39;+columns&#39;  =&gt; [ { &#39;email&#39; =&gt; \&#39;&#39; } ], # and so on for other missing fields</div>
<div>};</div><div><br></div><div>then</div><div><br></div><div>my $rs = $schema-&gt;search_rs( $query, $search_attr );</div></div></blockquote><div><br></div><div>Hi Peter,</div><div><br></div><div>Maybe I&#39;m not understanding your suggestion.  The problem I have is an existing application that uses DBIC, and (perhaps incorrectly) there&#39;s quite a few direct uses of $user-&gt;get_column( &#39;email&#39; ),  I could probably replace those in the app by adding, for example, an &quot;email&quot; method to the result class.   There&#39;s also other uses of the &quot;email&quot; column such as create() and maybe other resultset methods that verify that every key in the passed in data is an actual column.</div>

<div><br></div><div>I suspect replacing the get_column() usage is necessary.  But, I&#39;m not sure how best to deal with any other methods that might reference a non-existent column.</div><div><br></div><div>Really, what I need to do is prevent the column from ending up in SQL.  So, could I defined the non-existent column in the result class and then override the SQL generation somewhere to strip out the columns?  I suspect that&#39;s less that trivial.</div>

<div><br></div><div>Other option would be to override insert and create and strip out the non-existent columns.</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>Unfortunately, I can&#39;t just add the columns to the database.</div>

</div><div><br></div><div>Any other ideas?</div><div><br></div><div>Thanks,</div><div><br></div><div><br></div><div> </div></div>-- <br>Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a><br>