Best practice for entity update.

2007-02-09 Thread Christopher Thill
I wanted to ask a question about the best way to prevent users overwriting each others changes when updating the database. If you use the simplest way IntakeTool intake = (IntakeTool) context.get(ConstSpr.INTAKE_STRING); Group group =

Database independent error trapping.

2007-02-09 Thread Christopher Thill
I am wondering if there is a way to do database independent error trapping. For example on a table/object that has a unique key I just invoke the .save() method and and trap any exception. I look at the exception to see if it was a duplicate value in the unique column that caused the error and

Re: Can't save object that has no fields except primary key

2006-08-21 Thread Christopher Thill
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

Database insert attempted without anything specified to insert

2006-05-18 Thread Christopher Thill
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 =