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

EOF not setting the PK in INSERT statements


  • Subject: EOF not setting the PK in INSERT statements
  • From: David Avendasora <email@hidden>
  • Date: Mon, 04 Mar 2013 10:49:12 +0800

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.




 _______________________________________________
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: EOF not setting the PK in INSERT statements
      • From: Faizel Dakri <email@hidden>
  • Prev by Date: Re: More Embedded D2W Questions...
  • Next by Date: Re: EOF not setting the PK in INSERT statements
  • Previous by thread: Re: More Embedded D2W Questions...
  • Next by thread: Re: EOF not setting the PK in INSERT statements
  • Index(es):
    • Date
    • Thread