db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Busch <hendrik.bu...@lexisnexis.de>
Subject Re: Problem updating a table without a primary key
Date Fri, 21 Jan 2005 08:39:54 GMT
Hi!

> I attempted to update entries in a table without a primary key while
> using torque 3.0 and mysql 4.0.17. I tried
> 
> object.save()
> ObjectPeer.doUpdate( object ), and
> ObjectPeer.doUpdate( criteria )
> 
> but none of these attempts even resulted in an update event in the
> database log, nor in any java application log. As soon as I added a
> primary key to the table, object.save() began working as expected.

I made the experience that Torque does not handle tables without a 
primary key very well because most operations are based on the pk. 
Deleting from one of those tables won't work as well, you'll get some 
KeyDefNotFoundException.

Since I didn't have the time to examine this behaviour any further, I 
now add a primary key to every table, even if it doesn't need one, just 
to keep Torque working.

 > Is this a bug, or am I missing something obvious?

See also last entry here:

http://wiki.apache.org/db-torque/TorqueProjectPages/FAQ

It's a conceptual problem.

-- 
Mit freundlichen Grüßen / Kind regards

Hendrik Busch - Senior Developer

LexisNexis Deutschland GmbH
http://www.lexisnexis.de
Feldstiege 100
D-48161 Münster
phone +49 (0) 2533-9300-455
fax +49 (0) 02533-9300-50
hendrik.busch@lexisnexis.de

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message