You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Christopher Thill <ct...@yahoo.com> on 2006/05/18 12:47:06 UTC

Database insert attempted without anything specified to insert

Hi,

I am using Turbine 2.3.2.  Which I believe uses torque 3.1.1.  I am attempting to add a row to the TurbineUserGroupRole table using the following code.

        int userId = data.getParameters().getInt("userId");
        ugr.setUserId( userId );
        int groupId = data.getParameters().getInt("groupId");
        ugr.setGroupId( groupId );
        int roleId = data.getParameters().getInt("roleId");
        ugr.setRoleId( roleId );
        ugr.save();

When the code executes I get the error "org.apache.torque.TorqueException: Database insert attempted without anything specified to insert".  I am using the standard turbine maven plugin generated turbine-security-schema.xml for the TurbineUserGroupRole table.  The schema is as follows

  <table name="TURBINE_USER_GROUP_ROLE">
    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
    <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>

    <foreign-key foreignTable="TURBINE_USER">
      <reference local="USER_ID" foreign="USER_ID"/>
    </foreign-key>

    <foreign-key foreignTable="TURBINE_GROUP">
      <reference local="GROUP_ID" foreign="GROUP_ID"/>
    </foreign-key>

    <foreign-key foreignTable="TURBINE_ROLE">
      <reference local="ROLE_ID" foreign="ROLE_ID"/>
    </foreign-key>
  </table>

Any help or pointers will be appreciated.

Regards,
Chris



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