• 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
SQL Statements Order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SQL Statements Order


  • Subject: SQL Statements Order
  • From: Marcos Trejo Munguia <email@hidden>
  • Date: Mon, 13 Nov 2006 16:32:12 -0600

Hi List,

I have the following issue, I'm using an intermediate table for a many to many relationship (supplier<--->>supplier_product<<--->product), the primary key of the intermediate table is composed by the foreign keys to supplier and product, If I delete an object fetched from the intermediate table and then I insert another object with the same supplier, product and save I get the next exception:

com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.PostgresqlExpression: "INSERT INTO public.supplier_product(supplierid, productid) VALUES (?, ?)" withBindings: 1:2(supplierid), 2:1865(productid)>:
Next exception:SQL State:23505 -- error code: 0 -- msg: ERROR: duplicate key violates unique constraint "supplier_product_pkey"


I think that the adaptor is sending a delete and an insert but the order is not the correct one.

Please help!

Thanks in advance.

Cheers

_______________________________________________
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: SQL Statements Order
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: File Upload using WOLongResponse
  • Next by Date: Re: WebObjects Exception Details...
  • Previous by thread: Re: To-one relationship not updated
  • Next by thread: Re: SQL Statements Order
  • Index(es):
    • Date
    • Thread