[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-dev
Subject:    [jira] [Created] (TORQUE-323) Error in schema.xml for cascade="none" with postgresql
From:       "Martin Tilsted (JIRA)" <jira () apache ! org>
Date:       2014-08-10 19:28:11
Message-ID: JIRA.12733117.1407698816091.51421.1407698891664 () arcas
[Download RAW message or body]

Martin Tilsted created TORQUE-323:
-------------------------------------

             Summary: Error in schema.xml for cascade="none" with postgresql
                 Key: TORQUE-323
                 URL: https://issues.apache.org/jira/browse/TORQUE-323
             Project: Torque
          Issue Type: Bug
    Affects Versions: 4.0
         Environment: Postgresql 9.3.4 Java 8, on 64bit x86 Fedora.
            Reporter: Martin Tilsted


If you in your schema.xml have a
<foreign-key onUpdate="none" ...>

Then torque will generate a 
ALTER TABLE book
    ADD CONSTRAINT book_FK_1
    FOREIGN KEY (keyref)
    REFERENCES keyreftable (id)
    ON UPDATE NONE
    ON DELETE NONE;

But postgresql don't accept the syntax "On update none" and "on delete none"

It should be "on update no action" and "on delete no action" instead.

Since onUpdate="none" is the default if no onUpdate value have been set in \
schema.xml, this make it imposible to generate the database from the sql, unless \
onUpdate and onDelete have been specified on all foreign keys.




--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic