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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to