Actually, upon reflection, it seems strange to me that column default  
values would have any effect on load().

That is, if I do

     User->new(some_unique_column => 'some value')->load()

is there any legitimate reason I'd want a default value for a  
different unique or primary column to be silently "inserted" into my  
search?

This seems like a side-effect of using the same object to both  
initiate a search (with load()) and to insert a new row. I'm sure  
there's some history and good justification behind this decision,  
though.

Jon


On Jun 21, 2007, at 11:50 AM, Jonathan Swartz wrote:

> Thanks. I had the feeling it would be a short answer. :)
>
> Jon
>
> On Jun 21, 2007, at 11:07 AM, John Siracusa wrote:
>
>> On 6/21/07, Jonathan Swartz <[EMAIL PROTECTED]> wrote:
>>> If I create a new Rose::DB::Object without specifying some not-null
>>> fields, should the getters return a defined or undefined value?
>>>
>>> The following script provides different answers for sqlite and  
>>> mysql.
>>
>> The short answer is that auto_initialize() is picking up what
>> DBD::mysql claims is the default value for the email column (an empty
>> string) and honoring it.
>>
>> The long answer:
>>
>> http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/ 
>> msg01394.html
>>
>> -John
>>
>> --------------------------------------------------------------------- 
>> ----
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Rose-db-object mailing list
>> Rose-db-object@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rose-db-object
>>
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to