Hi Mark, you should use TurbineSecurity for things like that.
See http://jakarta.apache.org/turbine/turbine/turbine-2.3.2/apidocs/org/apache/tur bine/services/security/TurbineSecurity.html#grant(org.apache.turbine.om.securi ty.User,%20org.apache.turbine.om.security.Group,%20org.apache.turbine.om.secur ity.Role) Kind regards Juergen > -----Ursprüngliche Nachricht----- > Von: Mark Wassermann [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 26. März 2007 10:49 > An: Turbine Users List > Betreff: Turbine Torque Security Problem > > Hi > > I trying to write data to the TurbineUserGroupRole (Turbine 2.3.2) Table > and I am gettung the following error. > > > org.apache.torque.TorqueException: Database insert attempted without > anything specified to insert at > org.apache.torque.util.BasePeer.doInsert(BasePeer.java:478) at > mwapp.om.BaseTurbineUserGroupRolePeer.doInsert(BaseTurbineUserGroupRolePe > er.java:213) > ... > > My Code: > TurbineUserGroupRole entry = new TurbineUserGroupRole(); > > method a > entry.setPrimaryKey(data.getParameters().getInt("FD_User_ID"), > data.getParameters().getInt("TargetId"), > data.getParameters().getInt("FD_Role_ID")); > > method b > entry.setUserId(data.getParameters().getInt("FD_User_ID")); > entry.setGroupId(data.getParameters().getInt("TargetId")); > entry.setRoleId(data.getParameters().getInt("FD_Role_ID")); > > entry.save(); > > both methods produce the same result > > can someone give me a hint > thx > Mark > > -- > Mark Wassermann @: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
