On Nov 1, 2007, at 11:30 AM, Mike Schrag wrote:

Are you using an external FB plugin? I have a vague recollection that there is a FrontBasePlugin bundled inside of WO 5.4 ... Presumably that one works properly because it would be using the new API's.


Good clues. The WO 5.3 JavaDoc contains no FrontBasePlugin class unlike the WO 5.4 JavaDoc, so this suggests that WO 5.4 includes a FrontBase plugin.

My WO 5.3 projects include an external FrontBasePlugin from FrontBase (it's in /Library/Frameworks/FrontBasePlugin.framework). When I migrated my WO 5.3/Xcode 2 projects to WO 5.4/Eclipse, I configured their build paths using the same frameworks. Apparently, the external FrontBase plugin is used rather than the internal version. I can't find a way to change that without removing the external plugin from the build path. Using the external plugin, the SQL generated is:

-- The 'Drop Primary Key Support' option is unavailable.;

DROP TABLE "PERSON" CASCADE;

CREATE TABLE "PERSON" (
        "COMMENT" VARCHAR(1024),
        "EMAILADDRESS" VARCHAR(40) NOT NULL,
        "FIRSTNAME" VARCHAR(20) NOT NULL,
        "FULLNAME" VARCHAR(41) NOT NULL,
        "ID" INTEGER NOT NULL,
        "LASTEMAILED" TIMESTAMP,
        "LASTNAME" VARCHAR(20) NOT NULL,
        "LASTUPDATE" TIMESTAMP,
        "LASTUPDATECOMMENT" TIMESTAMP,
        "LASTUPDATESTATUS" TIMESTAMP,
        "LOCATIONID" INTEGER,
        "REMINDINTERVAL" INTEGER NOT NULL,
        "REMINDUNITS" VARCHAR(10) NOT NULL,
        "REMINDMESSAGE" VARCHAR(1024),
        "STARTREMIND" INTEGER NOT NULL,
        "STARTUNITS" VARCHAR(10) NOT NULL,
        "ROMEID" VARCHAR(10) NOT NULL,
        "STATUSID" INTEGER,
        "TERMINATIONDATE" TIMESTAMP,
        "TIMEZONE" VARCHAR(30),
        "WANTSNOTIFICATION" BOOLEAN NOT NULL,
        "WORKPHONE" VARCHAR(40) NOT NULL
);

SET UNIQUE = 1000000 FOR "PERSON";

ALTER TABLE "PERSON" ADD PRIMARY KEY ("ID") NOT DEFERRABLE INITIALLY IMMEDIATE;

ALTER TABLE "PERSON" ADD FOREIGN KEY ("STATUSID") REFERENCES "LOCATION" ("ID") DEFERRABLE INITIALLY DEFERRED;

ALTER TABLE "PERSON" ADD FOREIGN KEY ("LOCATIONID") REFERENCES "LOCATION" ("ID") DEFERRABLE INITIALLY DEFERRED;

When I remove FrontBasePlugin.framework from the build path, the SQL generated for the same table is:

DROP TABLE PERSON CASCADE;

CREATE TABLE PERSON ("COMMENT" VARCHAR(1024), "EMAILADDRESS" VARCHAR(40)NOT NULL, "FIRSTNAME" VARCHAR(20)NOT NULL, "FULLNAME" VARCHAR(41)NOT NULL, "ID" INTEGERNOT NULL, "LASTEMAILED" TIMESTAMP, "LASTNAME" VARCHAR(20)NOT NULL, "LASTUPDATE" TIMESTAMP, "LASTUPDATECOMMENT" TIMESTAMP, "LASTUPDATESTATUS" TIMESTAMP, "LOCATIONID" INTEGER, "REMINDINTERVAL" INTEGERNOT NULL, "REMINDUNITS" VARCHAR(10)NOT NULL, "REMINDMESSAGE" VARCHAR(1024), "STARTREMIND" INTEGERNOT NULL, "STARTUNITS" VARCHAR(10)NOT NULL, "ROMEID" VARCHAR(10)NOT NULL, "STATUSID" INTEGER, "TERMINATIONDATE" TIMESTAMP, "TIMEZONE" VARCHAR(30), "WANTSNOTIFICATION" BOOLEANNOT NULL, "WORKPHONE" VARCHAR(40)NOT NULL);

/* The 'Create Primary Key Support' option is unavailable. */;

ALTER TABLE PERSON ADD PRIMARY KEY (ID);

ALTER TABLE PERSON ADD CONSTRAINT PERSON_status_FK FOREIGN KEY (STATUSID) REFERENCES LOCATION (ID);

ALTER TABLE PERSON ADD CONSTRAINT PERSON_location_FK FOREIGN KEY (LOCATIONID) REFERENCES LOCATION (ID);

Not only is the CREATE TABLE SQL invalid because of a lack of field separation space characters, but I wonder whether the lack of the various DEFERRABLE INITIALLY * clauses will result in unexpected behavior. Also, I wonder whether not setting the primary key sequence value will matter. Note that the external FrontBase plugin that I'm using is from 2006, so it's not as new as it might be. If I had a newer version, the SQL generated might be more similar to that generated by the internal plugin.

So I'd conclude that the SQL generation bug must be a WO 5.4 bug that can be worked around by using an external plugin (at least for FrontBase).

Aloha,
Art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to