Hmm...

Perhaps I am being too explicit in creating relationships because it's a 
compound key. 
That gives me another idea to try. 

Thanks chuck 


=====================
Larry Mills-Gahl

> On Oct 3, 2013, at 11:59 PM, Chuck Hill <[email protected]> wrote:
> 
> 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 protected]
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 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 protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to