This is happening, currently, to one of my tables.

I am doing:

ConversationMessageDO om = new ConversationMessageDO();
om.setMessageID("1");
om.setConversationID("2");
om.save();

Those two fields are the only rows on this column. This is an intersect
table, and both rows point to other tables, if that helps.

When I try to do this I get the following exception thrown at me:

org.apache.torque.TorqueException: Database insert attempted without
anything sp
ecified to insert
        at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:839)
        at
com.uniti.db.om.BaseConversationMessageDOPeer.doInsert(BaseConversati
onMessageDOPeer.java:152)
        at
com.uniti.db.om.BaseConversationMessageDOPeer.doInsert(BaseConversati
onMessageDOPeer.java:417)
        at
com.uniti.db.om.BaseConversationMessageDO.save(BaseConversationMessag
eDO.java:376)
        at
com.uniti.db.om.BaseConversationMessageDO.save(BaseConversationMessag
eDO.java:341)
        at
com.uniti.db.om.BaseConversationMessageDO.save(BaseConversationMessag
eDO.java:324)

I spent a good deal of time perusing the source code to find out whats up.
The last line called in BaseConversationMessageDOPeer calls doInsert on the
BasePeer class, as you can see from the trace. The parameters it passes are
a Criteria and DBConnection. The interesting bit is that the Criteria seems
to be completely empty. Why? Because in buildCriteria() it only ads
information to the criteria object if the object is not new. Well the object
is of course new since we are doing an insert.

Anyone know whats up with this? This doesn't seem to happen with all
classes. I am most perplexed.

Thanks.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to