Does Entity Developer support array parameters to stored fun
Posted: Fri 25 May 2012 22:15
I have written a couple of stored functions in my database that take a UUID and an array of UUIDs as parameters. They compile fine in PostgreSQL.
When I try to update my database model in Entity Developer and include these functions in the model, I get the error:
How do I fix the model to get rid of the error?
Here is the code for one of the functions:
Tony
When I try to update my database model in Entity Developer and include these functions in the model, I get the error:
Code: Select all
The Type ARRAY is not qualified with a namespace or alias. Only PrimitiveTypes can be used without qualification.
Here is the code for one of the functions:
Code: Select all
CREATE OR REPLACE FUNCTION security.SynchRolesForGroup(grpid uuid, roleids uuid[]) RETURNS void AS
$BODY$
DECLARE
RoleId UUID;
BEGIN
DELETE FROM security.aspnetx_RolesInGroups WHERE GroupId = GrpId;
-- Now loop over all of the UUIDs in the RoleIds parameter
FOREACH RoleId IN ARRAY RoleIds LOOP
INSERT INTO security.aspnetx_RolesInGroups
( GroupId, RoleId )
VALUES
( GrpId, RoleId );
END LOOP;
END;
$BODY$
LANGUAGE plpgsql;