Page 1 of 1

Another Entity Framework Function problem

Posted: Thu 03 Nov 2011 19:28
by TonyV
I have created 2 new stored functions in my postgres database:

Code: Select all

CREATE OR REPLACE FUNCTION tracking."CurrentVersion"() RETURNS BIGINT
AS $$
	SELECT currval('tracking."Versions_From_seq"'::regclass);
$$ LANGUAGE Sql;

CREATE OR REPLACE FUNCTION tracking."NextVersion"() RETURNS BIGINT
AS $$
    SELECT nextval('tracking."Versions_From_seq"'::regclass);
$$ LANGUAGE Sql;
I have updated my Entity Model to include these functions. When I try to create a method for either of them, I get the following error message:

Code: Select all

Cannot create method for a storage funtion 'CurrentVersion' that can be composed.  Only stored procedures may be mapped.
I have tried checking off "Concealed Function" in the function editor dialog, but this doesn't stayed checked. When I open the editor again, the check mark is gone.

How do I add these functions to my model?

Tony

Posted: Fri 04 Nov 2011 16:31
by Shalex
TonyV wrote:I have tried checking off "Concealed Function" in the function editor dialog, but this doesn't stayed checked. When I open the editor again, the check mark is gone.
We have reproduced this bug and will post here when it is fixed.

As a temporary workaround, please set "Concealed Function" to True in the Properties window (select function in strore part in Model Explorer and press F4).

Posted: Wed 09 Nov 2011 16:00
by Shalex
The bug with setting the Concealed Function property in Stored Procedure Editor is fixed. We will notify you when the corresponding build of dotConnect for PostgreSQL is available for download.

Posted: Fri 11 Nov 2011 17:07
by Shalex
New build of dotConnect for PostgreSQL 5.50.244 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22545 .