Page 1 of 1

'ORA-00928: missing SELECT keyword' saving identity-only tbl

Posted: Fri 01 Jul 2011 05:00
by piers7
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:

Code: Select all

insert into MY_TABLE () values ()
...wheras Oracle requires something like this:

Code: Select all

insert into MY_TABLE values(default)
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.

Posted: Mon 04 Jul 2011 15:33
by AndreyR
Thank you for the report, I have reproduced the issue.
I will let you know as soon as it is fixed.

Posted: Wed 20 Jul 2011 13:40
by AndreyR
The problem is fixed. Follow the announcements on our forum.