Date Types with Postgresql

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Mikkeli
Posts: 2
Joined: Tue 19 Feb 2013 05:59

Date Types with Postgresql

Post by Mikkeli » Mon 01 Apr 2013 11:15

When i try to
Generate Database Script from model...
and
Update database from model
Date datatypes is all mapped to date
Sample:
CREATE TABLE efinvoice.class1s (
id UUID NOT NULL,
property_date DATE NOT NULL,
property_datetime DATE NOT NULL,
property_datetime2 DATE NOT NULL,
property_dbtimestamp DATE NOT NULL,
property_localdatetme DATE NOT NULL,
property_utcdatetime DATE NOT NULL,
property_timestamp DATE NOT NULL,
property_time DATE NOT NULL,
"version" DATE NOT NULL,
CONSTRAINT "PK_class1s" PRIMARY KEY (id)

How I change those to correct one (Even version is DATE, not timestamp)

I use Devart Entity Developer 5.0.66.0 and fluent nhibernate template

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

Re: Date Types with Postgresql

Post by Shalex » Tue 02 Apr 2013 07:35

Thank you for the report. We will post here when the behaviour is changed: System.DateTime .NET structure will be mapped to TIMESTAMP database type.

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

Re: Date Types with Postgresql

Post by Shalex » Wed 03 Apr 2013 05:51

As a temporary workaround, please specify the server type explicitly: Property Editor > Column [...] > SQL Type.

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

Re: Date Types with Postgresql

Post by Shalex » Fri 05 Apr 2013 12:59

The behaviour is changed: System.DateTime .NET structure is mapped to TIMESTAMP database type when using Model First approach starting from the 5.5.80 build of Entity Developer: http://forums.devart.com/viewtopic.php?f=32&t=26309.
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).

Post Reply