MapToStoredProcedures not working with dotConnect for Postgres

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
RichCrane
Posts: 3
Joined: Tue 04 Mar 2014 17:53

MapToStoredProcedures not working with dotConnect for Postgres

Post by RichCrane » Tue 04 Mar 2014 18:01

We are trying to use the latest dotConnect for Postgres. We are doing Code First and would like to use MapToStoredProcedures. We cannot have the straight entities since we do a bunch extra stuff in the stored procedures.

See inner exception below.

Rich
--
Chief Architect
RedMetal, LLC

See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> Devart.Data.PostgreSql.PgSqlException: function ourapp_data_shard_0000.func_person_create(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist

RichCrane
Posts: 3
Joined: Tue 04 Mar 2014 17:53

Re: MapToStoredProcedures not working with dotConnect for Postgres

Post by RichCrane » Wed 05 Mar 2014 10:30

Okay, here are some of the things we are realizing.

- DevArt does not support DateTimeOffset. Please address this. Building large scale global applications require you to store datetimes in offsets from UTC. For now we switched back to DateTime.

- Postgres functions tend to act like method overloading and require you to bind the types based on the signature. We are having issues with Dates and UUIDs being passed down as strings and not 'exactly'. See the example below. This function does NOT work without the ::uuid or the ::date qualifiers. How can these qualifiers be sent to the database using DevArt?

SELECT ourapp_data_shard_0000.func_person_create(
'489cd0fb-f784-4b96-b874-647aa6068f03'::uuid,
'N',
'1970-09-19'::date,
'display name',
'[email protected]',
'first name',
'M',
'last name',
'00000000-0000-0000-0000-000000000000'::uuid
);

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

Re: MapToStoredProcedures not working with dotConnect for Postgres

Post by Shalex » Mon 10 Mar 2014 16:24

RichCrane wrote:DevArt does not support DateTimeOffset. Please address this. Building large scale global applications require you to store datetimes in offsets from UTC. For now we switched back to DateTime.
Could you please send us a small test project with the corresponding DDL/DML script (if needed) so that we can reproduce and investigate the issue with DateTimeOffset?
RichCrane wrote:This function does NOT work without the ::uuid or the ::date qualifiers. How can these qualifiers be sent to the database using DevArt?
Why are you calling your stored procedure explicitly with literal parameters?
Instead of this, you should map the stored procedure to the insert operation of the entity. After this, our provider itself will call your stored procedure using parameters with datatype specified explicitly.

Post Reply