• 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
Problems deleting records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems deleting records


  • Subject: Problems deleting records
  • From: Greg Hulands <email@hidden>
  • Date: Tue, 30 Mar 2004 11:05:11 +1000

Hi,
I am having trouble removing objects out of relationships. The code I
have is this:
	public WOComponent deleteAlbum()
     {
		Client c = ((Session)session()).user();

		c.removeObjectFromBothSidesOfRelationshipWithKey(album, "albums");
		session().defaultEditingContext().saveChanges();
         return null;
     }

This then generates the following in the console:

[2004-03-30 10:58:17 EST] <WorkerThread2>  === Begin Internal
Transaction
[2004-03-30 10:58:17 EST] <WorkerThread2>  evaluateExpression:
<com.webobjects.jdbcadaptor.PostgresqlExpression: "DELETE FROM
ClientImage WHERE (imageID = ? AND albumID = ? AND filename = ? AND
annotation is NULL AND thumbnail = ? AND preview = ? AND print = ? AND
path = ? AND width = ? AND height = ?)" withBindings: 1:1(imageID),
2:1(albumID), 3:"01.jpg"(filename),
4:"b82701c2-1641-47f5-a...f08-7775fa442158.jpg"(thumbnail),
5:"b82701c2-1641-47f5-a...157-c9681fe03877.jpg"(preview),
6:"b82701c2-1641-47f5-a...206-50aa20adfcbc.jpg"(print),
7:"/Library/WebServer/D...nts/LightBox/Images/"(path), 8:2224(width),
9:3348(height)>
[2004-03-30 10:58:17 EST] <WorkerThread2> 1 row(s) deleted
[2004-03-30 10:58:17 EST] <WorkerThread2>  evaluateExpression:
<com.webobjects.jdbcadaptor.PostgresqlExpression: "DELETE FROM Album
WHERE (albumID = ? AND annotation is NULL AND expiry = ? AND clientID =
? AND password is NULL AND themeID = ? AND title = ? AND type = ? AND
iconID = ? AND parentID is NULL)" withBindings: 1:1(albumID),
2:2004-03-30 10:21:57(expiry), 3:1(clientid), 4:8(themeID),
5:"Holidays"(title), 6:2(type), 7:1.0(iconID)>
[2004-03-30 10:58:17 EST] <WorkerThread2> 0 row(s) deleted
[2004-03-30 10:58:17 EST] <WorkerThread2>  === Rollback Internal
Transaction

It throws an exception of :

com.webobjects.eoaccess.EOGeneralAdaptorException:
deleteRowDescribedByQualifierEntity --
com.webobjects.jdbcadaptor.JDBCChannel: method failed to delete row in
database
[2004-03-30 10:58:17 EST] <WorkerThread2>
com.webobjects.eoaccess.EOGeneralAdaptorException:
deleteRowDescribedByQualifierEntity --
com.webobjects.jdbcadaptor.JDBCChannel: method failed to delete row in
database

I don't quite understand why it is failing on the deletion of the Album
record. In the validateForDelete method of the album, I iterate over
each image record so that it can remove the image from the hard drive.

Does anyone have any clue in trying to hunt down this little buggar?


Any help is greatly appreciated.

Regards,
Greg
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Reminder: WebObjects Developers Group New York City
  • Next by Date: Re: OT : Coding Standards (was New WebObjects 15 Minute Tutorial in Quicktime)
  • Previous by thread: Reminder: WebObjects Developers Group New York City
  • Next by thread: Re: Problems deleting records
  • Index(es):
    • Date
    • Thread