• 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
Re: EOF not setting the PK in INSERT statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF not setting the PK in INSERT statements


  • Subject: Re: EOF not setting the PK in INSERT statements
  • From: Robert Hanviriyapunt <email@hidden>
  • Date: Mon, 04 Mar 2013 00:49:00 -0600

Reverse engineer just the one table in a new project.  Test your insert.  Copy the entity from one model to the other.  Fix any missing relationships. And retest in the reintegrated app.

Just a suggestion.

On Mar 3, 2013, at 10:41 PM, David Avendasora <email@hidden> wrote:

Hi Faizel,

Oddly, the "id" prototype removes any columnName I specify, but all the other entities that work have the same thing (no columnName). However I did try manually changing the .plist and running, but got the same error.

Thanks for the try, though!

Dave


On Mar 4, 2013, at 11:45 AM, Faizel Dakri <email@hidden> wrote:

I don't see a column name for your id attribute in the plist file. Perhaps that is throwing EOF off.

F

On 2013-Mar-03, at 08:49 PM, David Avendasora <email@hidden> wrote:

Hey all,

I have one entity (out of about 40) that refuses to insert data into my FrontBase database. It generates the SQL but is leaving out the PK.

Here's the SQL:

INSERT INTO "KC_TYPE_MASTER"("DISPLAY_NAME_OVERRIDE", "TYPE_KC_TYPE_ELEMENT_ID", "KC_TYPE_ENTITY_PROPERTY_ID") VALUES (NULL, 1000000, 4)

The PK column (ID) is simply missing from the statement. For all other tables, the PK is just one of the values being inserted and everything works just fine.

I'm not even seeing the normal SQL call to get the PK value from the DB (i.e., VALUES (SELECT UNIQUE FROM "KC_TYPE_MASTER"))

So something is going wrong with EOF prior to generating the SQL for the insert, but what?

The Entity has a non-class, single-attribute PK. It is not part of an inheritance structure, it's just a (very) simple table.

Below is the .plist from the .eomodeld for this entity.

Any ideas?

Dave


{
    attributes = (
        {
            allowsNull = Y;
            columnName = "DISPLAY_NAME_OVERRIDE";
            name = displayNameOverride;
            prototypeName = varchar100;
        },
        {allowsNull = N; name = id; prototypeName = id; },
        {
            allowsNull = N;
            columnName = "KC_TYPE_ENTITY_PROPERTY_ID";
            name = kcTypeEntityPropertyId;
            prototypeName = id;
        },
        {
            allowsNull = N;
            columnName = "TYPE_KC_TYPE_ELEMENT_ID";
            name = typeKCTypeElementID;
            prototypeName = id;
        }
    );
    attributesUsedForLocking = (displayNameOverride, id, kcTypeEntityPropertyId, typeKCTypeElementID);
    className = "com.kaiten.core.eo.type.KCTypeMaster";
    classProperties = (displayNameOverride, typeEntityProperty, types, typeTypeElement);
    externalName = "KC_TYPE_MASTER";
    fetchSpecificationDictionary = {};
    name = KCTypeMaster;
    primaryKeyAttributes = (id);
    relationships = (
        {
            destination = KCTypeEntityProperty;
            isMandatory = Y;
            isToMany = N;
            joinSemantic = EOInnerJoin;
            joins = ({destinationAttribute = id; sourceAttribute = kcTypeEntityPropertyId; });
            name = typeEntityProperty;
            userInfo = {fetchFor = {Many = ""; }; qualifier = ""; };
        },
        {
            destination = KCType;
            isToMany = Y;
            joinSemantic = EOInnerJoin;
            joins = ({destinationAttribute = kcTypeMasterID; sourceAttribute = id; });
            name = types;
        },
        {
            destination = KCTypeElement;
            isMandatory = Y;
            isToMany = N;
            joinSemantic = EOInnerJoin;
            joins = ({destinationAttribute = id; sourceAttribute = typeKCTypeElementID; });
            name = typeTypeElement;
            userInfo = {fetchFor = {Many = ""; }; qualifier = ""; };
        }
    );
}


—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Kaiten, Inc.




—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Kaiten, Inc.



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
References: 
 >EOF not setting the PK in INSERT statements (From: David Avendasora <email@hidden>)
 >Re: EOF not setting the PK in INSERT statements (From: Faizel Dakri <email@hidden>)
 >Re: EOF not setting the PK in INSERT statements (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: EOF not setting the PK in INSERT statements
  • Next by Date: Re: More Embedded D2W Questions...
  • Previous by thread: Re: EOF not setting the PK in INSERT statements
  • Next by thread: Re: D2W permissions on a row in a list
  • Index(es):
    • Date
    • Thread