[Nitro] Errors with Og and existing table/data

Reid Thompson reid.thompson at ateb.com
Fri Apr 7 00:26:07 EDT 2006


Bryan Soto wrote:
> On 4/6/06, Reid Thompson <reid.thompson at ateb.com> wrote:
>   
>> Hmm.. why is it attempting to do an update, rather than an insert?
>> Using a pre-existing table does not restrict you to ONLY updating
>> existing data does it????
>>
>>     
>
> This one I'm not sure, but I suspect if you placed
>
> p a.saved?; exit
>
> before your call to a.save, you'd get an empty string which happens to
> evalutate to true in Ruby. This makes Og think it's a saved object and
> so it tries to update it.
>   
I'll try to make time to verify this and respond
>   
>> And the where clause is not quoted....
>>
>>     
>
> And this seems to be because eval_og_allocate assumes that the key is
> a number, not a string.
>   
that thought crossed my mind - I would be willing to re-test if it's needed.
> I think I can duplicate this and create a test case. I doubt it's
> specific to Postgres either.
>
> For your sanity, I think these are both bugs. Thank you for finding
> and reporting. Now let's see if I can fix them...
>
> --
> "Never tell people how to do things. Tell them what to do and they
> will surprise you with their ingenuity." —General George S. Patton
>   




More information about the Nitro-general mailing list