Migration and use of ERXJDBCUtilities.executeUpdate
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