Bug in Table.insert(Iterable)?

40 views
Skip to first unread message

Thomas Lockney

unread,
Nov 15, 2010, 2:04:27 PM11/15/10
to Squeryl
I'm not sure if this is expected behavior, but I ran across what would
seem to be bug when using the Iterable form of Table.insert. Normally,
when inserting a new row via Table.insert, the primary key is
generated and updated on the object instance inserted. However, when I
attempt to use the form of Table.insert that takes an Iterable, this
does not happen. Is this expected? I have not had time to dig around
in the code thoroughly, but it does look like the code used for batch
inserts is quite a bit different from that used for a single object.
If needed, I can create a test case to demonstrate this. Otherwise,
assuming this is not what should be happening when using batch
updates, I'll create a bug report. But I wanted to check my
expectations first.

Maxime Lévesque

unread,
Nov 15, 2010, 9:54:21 PM11/15/10
to squ...@googlegroups.com
Hi, the batch insert does not retreive the autoincremented key values,
you can consider it a bug or a missing feature, last time I checked
the strategy needs to be different for different databases, those
that use sequences will do it differently than those with autoincrement
column types. If you have gathered info on this, please include it in
your bug report.

Max

Reply all
Reply to author
Forward
0 new messages