[Nitro] Errors with Og and existing table/data

Bryan Soto bryan.a.soto at gmail.com
Thu Apr 6 19:00:42 EDT 2006


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.

> 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.

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