for (int idx = 0; idx < properties.length; idx++)
for (int idx = 0; idx < primaryKeys.length; idx++)
    public void update(Connection connection, Database model, DynaBean dynaBean) throws DynaSqlException    {        SqlDynaClass      dynaClass   = model.getDynaClassFor(dynaBean);        SqlDynaProperty[] primaryKeys = dynaClass.getPrimaryKeyProperties();        if (primaryKeys.length == 0)        {            _log.info("Cannot update instances of type " + dynaClass + " because it has no primary keys");            return;        }        SqlDynaProperty[] properties = dynaClass.getNonPrimaryKeyProperties();        String            sql        = createUpdateSql(model, dynaClass, primaryKeys, properties, null);        PreparedStatement statement  = null;        if (_log.isDebugEnabled())        {            _log.debug("About to execute SQL: " + sql);        }        try        {            statement = connection.prepareStatement(sql);            int sqlIndex = 1;            for (int idx = 0; idx < properties.length; idx++)            {                setObject(statement, sqlIndex++, dynaBean, properties[idx]);            }            for (int idx = 0; idx < properties.length; idx++)            {                setObject(statement, sqlIndex++, dynaBean, primaryKeys[idx]);            }            int count = statement.executeUpdate();            if (count != 1)            {                _log.warn("Attempted to insert a single row " + dynaBean +                         " into table " + dynaClass.getTableName() +                         " but changed " + count + " row(s)");            }        }        catch (SQLException ex)        {            throw new DynaSqlException("Error while updating in the database", ex);        }        finally        {            closeStatement(statement);        }    }