• 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
Migration and use of ERXJDBCUtilities.executeUpdate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Migration and use of ERXJDBCUtilities.executeUpdate


  • Subject: Migration and use of ERXJDBCUtilities.executeUpdate
  • From: Helmut Schottmüller <email@hidden>
  • Date: Mon, 12 May 2008 15:41:23 +0200

Hi,

I tried so set some default data into my tables in my migration classes using

ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "INSERT INTO ...")

like in the screencast example David LeBer provided (thanks David for these magnificent screencasts).

My problem is that I am receiving an error:

ERROR: duplicate key violates unique constraint "t_user_pk"

which indicates that the primary key has already been used.
Is it a "bad" practice to use the standard EO way to create my datasets in migration e.g.


User user = new User();
ec.insertObject(user);
user.set...
...
ec.saveChanges();

This would set the correct PK's and then everything works fine.

Or is there a function I have to call to correct the PK's when I insert data with ERXJDBCUtilities which I don't know?

Thanks for any help,

Helmut

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Migration and use of ERXJDBCUtilities.executeUpdate
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: [OT] Frontbase Export/Dump
  • Next by Date: Re: Migration and use of ERXJDBCUtilities.executeUpdate
  • Previous by thread: Re: fckeditor and DirectConnect
  • Next by thread: Re: Migration and use of ERXJDBCUtilities.executeUpdate
  • Index(es):
    • Date
    • Thread