I had the same problem, I thought it was a bug too. The work around was build a criteria object with the data you want to insert and then call the insert method on the peer that takes a criteria.
The problem seems to be that Torque assumes that the all ids will be generated so when it builds its criteria object it does not populate it with the primary keys from the obect. This is fine if the primary key is generated by the id broker but does not work if the primary key of the object is made up of foreign keys to other objects. On Saturday 19 August 2006 04:57, Noel Murphy wrote: > I have a database schema which has one table that has nothing in it > except the primary key field. It is basically just a way of relating > all sorts of other information together. > > However, when I try to save one of these objects, I get a > TorqueException. > > Database insert attempted without anything specified to insert > > I will admit that I'm fairly new to Torque, however my other objects > seems to save alright. In case it matters, I'm using the idBroker way > of generating primary key values. > > Any thoughts? Is this a bug? > > > Excerpt from my schema.xml file: > > <table name="person" description="Person entries in the family > tree"> > <column name="person_id" required="true" primaryKey="true" > type="INTEGER" > description="Person Id"/> > </table> > > > Noel Murphy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
