Bug when an Oracle Date field has an autoegenerated value?

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
neaflo
Posts: 1
Joined: Sun 21 Dec 2008 23:14

Bug when an Oracle Date field has an autoegenerated value?

Post by neaflo » Mon 29 Dec 2008 02:42

Hi,

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
I have generated the entities with EntityDeveloper, and then manually set the next properties for this field:
* 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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 29 Dec 2008 12:04

Thank you for the report. We are investigating this issue. You will be notified about the results as soon as possible.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 29 Dec 2008 14:37

The problem is fixed. Look forward to the next build of dotConnect for Oracle that will be available during a week.

Post Reply