On Tue, May 10, 2011 at 7:00 PM, Jeremy Evans <[email protected]> wrote:
> On May 10, 4:07 am, Christian MICHON <[email protected]>
> wrote:
>> Hi,
>>
>> I'm currently making some sequel models for a small ramaze
>> application. The issues I found are purely related to sequel with a h2
>> memory db.
>>
>> I made a pastie from the h2/sequel code and the
>> backtrace:http://pastie.org/1884617.
>
> This was due to a bug in the jdbc adapter's table schema parsing
> support, where it was including columns from tables in the
> INFORMATION_SCHEMA (which includes the USERS table). I just pushed a
> commit that fixes it:
> https://github.com/jeremyevans/sequel/commit/01e2e34a143dcf85497e3364612095ad962d8fce
Yes, thanks: this commit fixed both the small testcase and my ramaze
application's issues.
> Basically, this bug added columns to the schema, duplicating an id
> column which was already there. Due to how the primary key
> determination is made, User.primary_key ended up being [:id, :id], a
> composite primary key. Because Sequel thought the primary key was
> composite, it didn't assign the return value of insert to the primary
> key, which is why you got: SELECT * FROM "USERS" WHERE ("ID" IS NULL)
> LIMIT 1
>
Thanks for the explanation, Jeremy.
--
Christian
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.