Oracle EF 4.1 Code First with no AutoNumber Column
Posted: Fri 14 Oct 2011 19:00
There seems to be a bug that if your Code First model does not contain any AutoNumber (DatabaseGeneratedOption.Identity) Columns, then it will not initialize the schema (create the tables).
It sends the following command:
and it errors out because it has an incomplete WHERE statement, and then creates no tables...
If I create a dummy table with an AutoNumber column, then it works:
It sends the following command:
Code: Select all
SELECT COUNT(*)
FROM SYS.ALL_SEQUENCES
WHERE
If I create a dummy table with an AutoNumber column, then it works:
Code: Select all
SELECT COUNT(*)
FROM SYS.ALL_SEQUENCES
WHERE (SEQUENCE_OWNER = SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA') AND SEQUENCE_NAME = 'Dmy_SEQ')