DateTime maps to Date on Postgresql

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
detaybey
Posts: 9
Joined: Thu 09 Jun 2011 16:23

DateTime maps to Date on Postgresql

Post by detaybey » Sat 11 Jun 2011 03:07

I am using Devart dotConnect 5.30.165.0
Postgre version 9.0.3 build 1500, 64-bit

I have created a diagram using Devart Entity Model.
My Schema has a class called User.
User has a property called "LastSeen" marked as "DateTime"

when I create the scheme, the field is mapped as "Date" and does not keep the time information (which is required)

In my EDML file, 2 things are seen for "LastSeen" in different locations (I didnt want to dump the whole file)

Code: Select all

  :
  
  :




 :
 
 :




            
              
 :
                
 :

Looks like the DateTime->TimeStamp conversion is done properly on the mapping, but when I use the CreateDatabase() method on my Context, the created file becomes as "Date". There seems to be a problem with creating db, but I believe this is a bug.

Can you help?

detaybey
Posts: 9
Joined: Thu 09 Jun 2011 16:23

as an addition

Post by detaybey » Sat 11 Jun 2011 12:35

Also my unit test proves that it cannot persist that field with the time information;

Code: Select all

Tests.ServiceTests.UserServiceTests.CreateUser:
  failed creating user
  Expected:1990-06-11 15:34:07.736
  But was: 1990-06-11 00:00:00.000

detaybey
Posts: 9
Joined: Thu 09 Jun 2011 16:23

Post by detaybey » Sat 11 Jun 2011 21:10

Can someone return me about this issue? I don't want to create a second field for time information on all my datetime fields, and this is an urgent matter!

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 14 Jun 2011 13:54

I have performed a simple test and failed to reproduce the issue.
Could you please send us a small test project illustrating the problem?

detaybey
Posts: 9
Joined: Thu 09 Jun 2011 16:23

Post by detaybey » Tue 14 Jun 2011 15:06

I checked "regenerate storage" option while updating database from model and it changed all Date fields with TimeStamp Without Time Zone.

Maybe because I said Database first at the beginning...

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 15 Jun 2011 07:45

Glad to hear that the issue is resolved.
Feel free to contact us if you encounter any other problems with our components.

Post Reply