db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Thill <cthil...@yahoo.com>
Subject Database insert attempted without anything specified to insert
Date Thu, 18 May 2006 10:47:06 GMT
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


Mime
View raw message