• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Migrations: A result was returned when none was expected.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Migrations: A result was returned when none was expected.


  • Subject: Migrations: A result was returned when none was expected.
  • From: Miguel Torres <email@hidden>
  • Date: Fri, 07 Sep 2012 09:37:41 -0500

Hi List,

I am getting this error:

A result was returned when none was expected.

I am executing a migration that creates a new table and a new procedure to insert some records to that table, because it has a reference to a table that already exists and may have some records. At the end of the migration, the procedure is dropped.

I am calling the procedure using a SELECT statement (Postgresql).

This is the content of my migration:

CREATE TABLE empresa_pacs (
    tf_habilitar character varying(5) NOT NULL,
    tf_modo character varying,
    tf_certificado character varying,
    tf_vencimiento_certificado date,
    tf_contrasena character varying,
    empresa_id integer PRIMARY KEY REFERENCES empresa ON DELETE CASCADE
);


CREATE FUNCTION inserta_empresa_pacs() RETURNS VOID
    AS 'DECLARE empresa_temp empresa%ROWTYPE;
  BEGIN FOR empresa_temp IN SELECT * FROM empresa LOOP INSERT INTO empresa_pacs(empresa_id, tf_habilitar) VALUES(empresa_temp.empresa_id, ''false'');
END LOOP;
END;'
    LANGUAGE plpgsql;

    

SELECT inserta_empresa_pacs() ;

DROP FUNCTION inserta_empresa_pacs();

I understand the error's meaning, I am asking if there are any other way to execute the migration to avoid the error.

Thanks in advance.

Miguel Torres.









 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Migrations: A result was returned when none was expected.
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Problem with nextPageDelegate
  • Next by Date: Re: classes.include.patternset and difference between Eclipse and Jenkins
  • Previous by thread: Error in a ModerD2W application
  • Next by thread: Re: Migrations: A result was returned when none was expected.
  • Index(es):
    • Date
    • Thread