[Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial)

Jonathan Buch john at oxyliquit.de
Mon Sep 3 19:18:35 EDT 2007


> 1) The Og::SqlStore#exec_statement seems to rearrange the data
> submitted in an sql string, and example of the original SQL statement
> data and the SQL statement submitted to the MySQL store follows.
>insert into ogmember ( address1,city,email,first_name,state,last_name
> ) values ( '123 High
> St.','Reykjavik','fred at flintstone.com','Fred','Michigan','Flintstone'
> )
>DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`,
> `first_name`, `state`, `last_name`) VALUES ('fred at flintstone.com',
> 'Fred', NULL, 'Flintstone', '123 High St.', 'Michigan', 'Reykjavik')

a few questions:

* where does the original come from?
* which method are you using to generate that query? (.save?)

I haven't had a problem yet where Og would 'rearrange' something,
this would be quite a bug to have, as essentially nothing would work.

exec_statement itself does nothing to the query (at least last I
had a look at it, it'd make no sense anyway, as it would have to
parse SQL since it only gets SQL).

Where that could only happen (depending on the method you used for
inserting):   sql.rb: def insert_sql(..)

That'd be the first place where I would make a few puts to find
out if Og is the culprit or if the original object was populated
wrong in the first place.

Hope that leads to Og working better for you,


Feel the love

More information about the Nitro-general mailing list