• 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: To-one relationship not updated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To-one relationship not updated


  • Subject: Re: To-one relationship not updated
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 14 Nov 2006 08:49:28 -0800

Someone posted on the Wonder list about a recent change in Wonder that causes this error (or one very similar to it) with OpenBase. Are you using a recent version of Wonder?

Chuck

On Nov 13, 2006, at 6:02 AM, Calven Eggert wrote:

Hi all,

I have a EOEnterpriseObject, called a Task record and it has a relationship, called AssignedTo, that connects to another EOEnterprise record called Identity. In my WO Application, when I assign an Identity to the Task record thus creating the AssignedTo relationship, it works the first time, but if I do it again immediately after, it then gives me the error:

updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database
com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database
at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContex tInformationAdded(EODatabaseContext.java:4685)
at com.webobjects.eoaccess.EODatabaseContext.performChanges (EODatabaseContext.java:6393)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditing Context(EOObjectStoreCoordinator.java:415)



Just recently getting a basic understanding on how WebObjects works and deals with snapshots, thanks to Chuck Hill’s book “Practical WebObjects”, I figured that the snapshot of the Task record, or actually the relationship AssignedTo, must not be updated after the first assignment is set. After putting in the line EditingContext.invalidateAllObjects(), the problem went away. I know this isn’t the best way to do this. But I thought that to-one relationships were suppose to be ok and the to-many needed to be babysat. I’ve also tried setRefreshesRefetchedObjects(True) but this didn’t work, I assume because I’m not actually going to the db after my save for a refetch. I’ve also tried setDefaultTimestampLag (2) but that didn’t work either.


Could someone please help me understand what is going on here? Suggested readings would also be greatly appreciated.

Thanks,
Calven
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden

--

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/products/practical_webobjects






_______________________________________________
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


References: 
 >To-one relationship not updated (From: Calven Eggert <email@hidden>)

  • Prev by Date: Re: WebObjects Exception Details...
  • Next by Date: Re: SQL Statements Order
  • Previous by thread: Re: To-one relationship not updated
  • Next by thread: Re: To-one relationship not updated
  • Index(es):
    • Date
    • Thread