'ORA-00928: missing SELECT keyword' saving identity-only tbl
Posted: Fri 01 Jul 2011 05:00
It's an edge-case, but I'm posting for reference in case anyone else runs into this.
I have a table with one, sequence-generated column, setup as an identity property in the model. So when I insert into that table via the model there are no attributes to set on the entity.
Either EF or the dotConnect driver creates the wrong Oracle insert statement when I call SaveChanges() on the context. The SQL generated is something like this:
...wheras Oracle requires something like this:
Took me running through a profiler to figure this one out. In this case the table will (ultimately) have some extra columns, which will fix the issue, but one to be aware of.
I have a table with one, sequence-generated column, setup as an identity property in the model. So when I insert into that table via the model there are no attributes to set on the entity.
Either EF or the dotConnect driver creates the wrong Oracle insert statement when I call SaveChanges() on the context. The SQL generated is something like this:
Code: Select all
insert into MY_TABLE () values ()
Code: Select all
insert into MY_TABLE values(default)