private void updateHasOne(Object obj, String column,
			Map<String, Object> foreignKey) {

		StringBuilder sb = new StringBuilder();
		sb.append("update " + obj.getClass().getSimpleName() + " set ");
		PreparedStatement stmt = null;
		Connection connection = null;
		try {
			PropertyDescriptor[] pd = handler.getPropertyDescriptors(obj
					.getClass());
			Map<String, Object> belongsTo = AnnotationUtils.getBelongsTo(obj);
			Map<String, Object> primaryKey = AnnotationUtils.getPrimaryKey(obj);
			for (int i = 0; i < pd.length; i++) {
				if ("class".equals(pd[i].getName())
						|| foreignKey.get("column").equals(pd[i].getName())) {
					continue;
				}
				if (pd[i].getName().equals(belongsTo.get("fieldName"))) {
					continue;
				}

				Method getter = pd[i].getReadMethod();
				Object value = getter.invoke(obj);
				sb.append(pd[i].getName()).append("=").append("'")
						.append(value).append("'");

				if (i != pd.length - 1) {
					sb.append(",");
				}
			}
			if (obj != null) {
				sb.append(",").append(column).append("=").append("'")
						.append(foreignKey.get("value")).append("'");
			}

			sb.append(" where ").append(primaryKey.get("column")).append("='")
					.append(primaryKey.get("value")).append("'");
			connection = DB.getConnection();
			stmt = connection.prepareStatement(sb.toString());
			stmt.executeUpdate();
		} catch (Exception e) {
			throw new ExcuteQueryException(e);
		} finally {
			DbUtils.closeQuietly(stmt);
		}
	}