• 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
Re: Object inserted multiple times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object inserted multiple times


  • Subject: Re: Object inserted multiple times
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 04 Oct 2013 03:59:52 +0000
  • Thread-topic: Object inserted multiple times

Is there an mandatory, owns destination relationship in there?  EOF will automatically create the destination object in that case.  Though that usually results in validation failures if you create your own as one has null values.


Chuck


On 2013-10-03 8:30 PM, "Laurence Mills-Gahl" wrote:
Hello all…

I'm having a bit of a breakdown over an object being inserted multiple times on save (and therefore complaining that a duplicate key exists and then rolling back)

I have a page that I'm working with a child editing context of an editing context held in the session (not the defaultEditingContext). 

The purpose of the page is to add an event for a person at a facility.

If the person does not yet have a role at the selected facility, I want to create one … and that is where the problem comes in.

I'm getting multiple role insertions for one facility.

evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "INSERT INTO patientrole(mrn, centerKey, personKey) VALUES (?, ?,?)" withBindings: 1:"XXXXXXX"(mrn), 2:1(centerkey), 3:84938(personkey)> 
evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "INSERT INTO patientrole(mrn, centerKey, personKey) VALUES (?, ?,?)" withBindings: 1:"XXXXXXX"(mrn), 2:1(centerkey), 3:84938(personkey)>

Is this an inheritance problem? (different facility types descend from AbstractFacility in one table with a type qualifier)
If so, what can I do about it?

Is this an editing context issue? 
Any ideas?


Larry Mills-Gahl
email@hidden








-- 
Chuck Hill             
Executive Managing Partner, VP Development and Technical Services

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! 

Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
 _______________________________________________
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: Object inserted multiple times
      • From: Laurence Mills-Gahl <email@hidden>
  • Prev by Date: Bulding a true war
  • Next by Date: Re: Object inserted multiple times
  • Previous by thread: Re: Bulding a true war
  • Next by thread: Re: Object inserted multiple times
  • Index(es):
    • Date
    • Thread