• 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 inserts PK automatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOF inserts PK automatically


  • Subject: EOF inserts PK automatically
  • From: "Sako!" <email@hidden>
  • Date: Wed, 3 Nov 2004 16:23:17 +0100

Hello,
 
i create an object and insert it in the ec, and fire save changes with this simple code
my table has {(id as PK ),(name)}

EOClassDescription classDescriptionAFDetails = EOClassDescription.classDescriptionForEntityName("Test2");

EOGenericRecord newTest2Object = (EOGenericRecord) classDescriptionAFDetails.createInstanceWithEditingContext(null, null);

newTest2Object.takeValueForKey("name ", "name");

session.defaultEditingContext().insertObject(newTest2Object);

session.defaultEditingContext().saveChanges();

EOF adds the PK automatically.

i use MS-SQL server and it supports adding the PK also. this mean i just need to add the name with sql like this

INSERT INTO test2 (name) VALUES ("my new name");

what i look for is, i would like to use the feature from the db. to do that i have to prvent EOF to add the PK automatically.

do i have chance to do that?

thanks.

sako

 _______________________________________________
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

  • Prev by Date: (no subject)
  • Next by Date: RE: EOF inserts PK automatically
  • Previous by thread: Re:
  • Next by thread: RE: EOF inserts PK automatically
  • Index(es):
    • Date
    • Thread