On 12/5/06, Clayton Scott <[EMAIL PROTECTED]> wrote:
> On 12/5/06, John Siracusa <[EMAIL PROTECTED]> wrote:
> > It's a bug.  The table name "position" is a keyword in Postgres and ends up
> > coming back in the DBI foreign key info as qq("position").  I handle quoted
> > values in the internal refine_dbi_foreign_key_info() method, but I wasn't
> > handling UK_TABLE_NAME.  I've made the fix in my local copy, but I'm in the
> > middle of some Oracle changes and I'm not ready to check in to SVN yet.  To
> > fix it yourself, replace this method in Rose::DB:
>
> Those darn keywords!  That fix did the trick for me.
>
> Thanks for your quick response.

Hmm, guess I spoke a little too quickly. When position looks like this:

CREATE TABLE position (
        id serial PRIMARY KEY,
        name text NOT NULL,
        stratum_id INTEGER NOT NULL
);

ALTER TABLE position ADD CONSTRAINT fk_position_stratum
FOREIGN KEY (stratum_id) REFERENCES stratum (id) ON DELETE NO ACTION;

and stratum looks like this:
CREATE TABLE stratum (id serial PRIMARY KEY, name text);

I am using a Loader script to generate static modules from the database and
Position.pm doesn't have a stratum foreign key defined. If I add it manually
everything works just peachy.


-- Clayton

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to