Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> PostgreSQL time type trouble
 

Pages: 1
Designer
PostgreSQL time type trouble
Page:1/1 

  Print all messages in this thread  
Poster Message
doktron
User



Location:
Luleå
Joined on:
28-Nov-2018 18:05:57
Posted:
4 posts
# Posted on: 28-Nov-2018 18:13:53.  
I've upgraded an old project from 2.6 (.lgp) to a 5.5 (.llblgenproj) project and have trouble with a bunch of tables that have columns of type "time without time zone". The db is PostgreSQL 9.2
In the old project these columns were mapped to System.TimeSpan but now the designer says they are mapped to System.DateTime and i get errors like this:

    The mapping of sub-element '[columnnameredacted]' of entity '[tablenameredacted]' for the target database with the driver 'PostgreSql Driver (Npgsql)' has the following errors:
- TypeConverterToUse: The .NET types of the mapped element field and the target field aren't the same/compatible and no implicit conversion is defined by the target framework for these types, so a type converter is needed.

Why does the LLBLGen designer think that these columns should be DateTime and how can I make them TimeSpan?
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14421 posts
# Posted on: 28-Nov-2018 19:59:50.  
Quote:
with a bunch of tables that have columns of type "time without time zone".

Just to be sure, for the PostgreSQL type, do you mean time or timestamp?

ref: https://www.npgsql.org/doc/types/datetime.html


  Top
doktron
User



Location:
Luleå
Joined on:
28-Nov-2018 18:05:57
Posted:
4 posts
# Posted on: 28-Nov-2018 20:15:10.  
I mean time, not timestamp

Edit: To be extra clear. In INFORMATION_SCHEMA table COLUMNS column data_type the value is "time without time zone".
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8022 posts
# Posted on: 29-Nov-2018 08:53:28.  
What version of NpgSql are you usien?

David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
doktron
User



Location:
Luleå
Joined on:
28-Nov-2018 18:05:57
Posted:
4 posts
# Posted on: 29-Nov-2018 09:12:18.  
4.0.3.0 is in my GAC, but can i see somewhere in the designer which version it uses?
  Top
doktron
User



Location:
Luleå
Joined on:
28-Nov-2018 18:05:57
Posted:
4 posts
# Posted on: 29-Nov-2018 09:47:48.  
Ok, figured it out. I made the wrong assumption. Double checked the old 2.6 project and this problem originated from that project. If i removed the entity in the 5.5 project and re-reversed engineered it from db it got correctly mapped to TimeSpan. Sorry to have wasted your time Shocked

  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.