I have just started trying out Linq to Oracle and I came accross the next issue. I have an Oracle table which has a field defined as:
Code: Select all
registered_on date default sysdate not null
* Auto Generated Value = true
* Auto-Sync = OnInsert
* Read Only = true
After I insert a new record into the table using InsertOnSubmit and call SubmitChanges, the value of the registered_on field is set to {01/01/0001 00:00:00} in C# code and it looks same in the database. It actually looks like the insert statement has been passed an empty System.DateTime instance. But as long as the above properties are set, the SQL insert statement should not include the registered_on field.
Curiously, the primary key field in the same table has exactly the same properties set as above, and it works fine - the value generated automatically by the database is retrieved correctly.
I'd expect registered_on field to be treated the same as the primary key field. Is this a bug? Will be fixed anytime soon?
Thanks,
Florin