szeiger/scala-query — Issue #27: Insert with autoincrement -- please support regular and forced insert
Author: macias
Created: 2011-11-29 13:31:30+00:00
State: open

Currently SQ supports only (directly) forced insert. However it should be possible to allow insert in both modes.

Table.forceInsert(record) <-- insert new record and pass all fields -- today it is insert
Table.softInsert(record) <-- insert new record, but pass fields except autoinc

All pieces are in place, you have AutoInc flags so it is possible to rule them out automatically. Currently it is possible to do "soft" insert but it requires each time quite work:
* create and maintain correct projection -- this is redundant
* inserts using tuples instead of class -- using named arguments (for clarity) is not possible