Re: Problems deleting records
Re: Problems deleting records
- Subject: Re: Problems deleting records
- From: Greg Hulands <email@hidden>
- Date: Tue, 30 Mar 2004 12:00:18 +1000
Thanks for the replies.
This seems to be the cause. Does this mean that I should unlock all
timestamps in my model?
Regards,
Greg
On 30/03/2004, at 11:44 AM, Chuck Hill wrote:
I'll hazard a guess that this is the source of your problems:
2004-03-30 10:21:57(expiry),
Not all databases/drivers/plugins handle conversion of time and
floating point values with out changing the value. WO 5.2.3 also
included some changes affecting this. the first thing to try is to go
into your model and remove the lock icon next to expiry. Build and
run and see if you can delete.
If so check for:
updates to the JDBC driver
updates to the plugin
updates to database
different ValueType or External Type in the model
timezone differences on DB server and app server
If that all fails you might not be able to lock on date/time
Chuck
On Mar 29, 2004, at 5:05 PM, Greg Hulands wrote:
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.
_______________________________________________
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.