public <T extends ActiveRecord> T createObject(ResultSet rs, Class<T> clazz,
			PropertyDescriptor[] props, int[] columnToProperty)
			throws SQLException {

		T object = newInstance(clazz);

		for (int i = 1; i < columnToProperty.length; i++) {
			if (columnToProperty[i] == -1) {
				continue;
			}
			PropertyDescriptor prop = props[columnToProperty[i]];
			Class<?> propertyType = prop.getPropertyType();
			Object value = processColumn(rs, i, propertyType);

			if (propertyType != null && propertyType.isPrimitive()
					&& value == null) {
				value = primitives.get(propertyType);
			}

			invokeSetter(object, prop, value);
		}
		return object;
	}