diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 9f9ec19..904263a 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,14 @@
 Changelog
 ---------
 
+0.17.2 (unreleased)
++++++++++++++++++++
+
+Bug fixes:
+
+* Fix error handling when passing an invalid type to ``Related`` (:issue:`223`).
+  Thanks :user:`heckad` for reporting.
+
 0.17.1 (2019-08-31)
 +++++++++++++++++++
 
diff --git a/src/marshmallow_sqlalchemy/fields.py b/src/marshmallow_sqlalchemy/fields.py
index 64d19ac..10a477c 100644
--- a/src/marshmallow_sqlalchemy/fields.py
+++ b/src/marshmallow_sqlalchemy/fields.py
@@ -127,7 +127,15 @@ class Related(fields.Field):
             ).one()
         else:
             # Use a faster path if the related key is the primary key.
-            result = query.get([value.get(prop.key) for prop in self.related_keys])
+            lookup_values = [value.get(prop.key) for prop in self.related_keys]
+            try:
+                result = query.get(lookup_values)
+            except TypeError:
+                keys = [prop.key for prop in self.related_keys]
+                if hasattr(self, "make_error"):
+                    raise self.make_error("invalid", value=value, keys=keys)
+                else:  # marshmallow 2
+                    self.fail("invalid", value=value, keys=keys)
             if result is None:
                 raise NoResultFound
         return result

Error `TypeError: unhashable type: 'list'`
If to try to deserialize model which should have relationship one to many and put the array in this field then there will be an error `TypeError: unhashable type: 'list'` instead of ValidationError
Example

    class M(Base):
       ....
       store_id = Column(ForeignKey('stores.id'))
       store = relationship("Store", uselist=False)
       ....

    M().load({"store":[1,2,3]})

diff --git a/tests/test_marshmallow_sqlalchemy.py b/tests/test_marshmallow_sqlalchemy.py
index cc77550..26e6bf3 100644
--- a/tests/test_marshmallow_sqlalchemy.py
+++ b/tests/test_marshmallow_sqlalchemy.py
@@ -758,6 +758,17 @@ class TestModelSchema:
         assert load_data is student
         assert load_data.current_school == student.current_school
 
+    def test_model_schema_loading_invalid_related_type(
+        self, models, schemas, student, session
+    ):
+        schema = schemas.StudentSchema()
+        dump_data = unpack(schema.dump(student))
+        dump_data["current_school"] = [1]
+        with pytest.raises(
+            ValidationError, match="Could not deserialize related value"
+        ):
+            schema.load(dump_data)
+
     def test_model_schema_loading_missing_field(
         self, models, schemas, student, session
     ):

pip install -e .[dev]
parse_log_pytest
pytest
pytest
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aspy.yaml==1.3.0
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
cfgv==3.3.1
distlib==0.3.9
entrypoints==0.3
filelock==3.4.1
flake8==3.7.8
flake8-bugbear==19.8.0
greenlet==2.0.2
identify==2.4.4
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
marshmallow==3.14.1
-e git+https://github.com/marshmallow-code/marshmallow-sqlalchemy.git@f766686dff24146e43474edc4c8a947ace8868aa#egg=marshmallow_sqlalchemy
mccabe==0.6.1
mock==5.2.0
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
nodeenv==1.6.0
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
platformdirs==2.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
pre-commit==1.21.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycodestyle==2.5.0
pyflakes==2.1.1
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
PyYAML==6.0.1
six==1.17.0
SQLAlchemy==1.4.54
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tox==3.28.0
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
virtualenv==20.17.1
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: marshmallow-sqlalchemy
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aspy-yaml==1.3.0
      - cfgv==3.3.1
      - distlib==0.3.9
      - entrypoints==0.3
      - filelock==3.4.1
      - flake8==3.7.8
      - flake8-bugbear==19.8.0
      - greenlet==2.0.2
      - identify==2.4.4
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - marshmallow==3.14.1
      - mccabe==0.6.1
      - mock==5.2.0
      - nodeenv==1.6.0
      - platformdirs==2.4.0
      - pre-commit==1.21.0
      - pycodestyle==2.5.0
      - pyflakes==2.1.1
      - pyyaml==6.0.1
      - six==1.17.0
      - sqlalchemy==1.4.54
      - tox==3.28.0
      - virtualenv==20.17.1
prefix: /opt/conda/envs/marshmallow-sqlalchemy

tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_invalid_related_type
tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_Binary
tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_fields_for_model_types tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_fields_for_model_handles_exclude tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_fields_for_model_handles_custom_types tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_fields_for_model_saves_doc tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_length_validator_set tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_sets_allow_none_for_nullable_fields tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_sets_enum_choices tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_many_to_many_relationship tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_many_to_one_relationship tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_include_fk tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_overridden_with_fk tests/test_marshmallow_sqlalchemy.py::TestModelFieldConversion::test_info_overrides tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_custom_type_mapping_on_schema tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_String tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_Unicode tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_LargeBinary tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_Text tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_Date tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_DateTime tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_Boolean tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_Numeric tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_Float tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_SmallInteger tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_UUID tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_MACADDR tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_INET tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_ARRAY_String tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_ARRAY_Integer tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_TSVECTOR tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_default tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_server_default tests/test_marshmallow_sqlalchemy.py::TestPropertyFieldConversion::test_convert_autoincrement tests/test_marshmallow_sqlalchemy.py::TestPropToFieldClass::test_property2field tests/test_marshmallow_sqlalchemy.py::TestPropToFieldClass::test_can_pass_extra_kwargs tests/test_marshmallow_sqlalchemy.py::TestColumnToFieldClass::test_column2field tests/test_marshmallow_sqlalchemy.py::TestColumnToFieldClass::test_can_pass_extra_kwargs tests/test_marshmallow_sqlalchemy.py::TestColumnToFieldClass::test_uuid_column2field tests/test_marshmallow_sqlalchemy.py::TestFieldFor::test_field_for tests/test_marshmallow_sqlalchemy.py::TestFieldFor::test_field_for_can_override_validators tests/test_marshmallow_sqlalchemy.py::TestTableSchema::test_dump_row tests/test_marshmallow_sqlalchemy.py::TestTableSchema::test_exclude tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_with_custom_type_mapping tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_field_inheritance tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_class_meta_inheritance tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_ordered tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_dumping tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_missing_field tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_custom_instance tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_resets_instance tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_no_instance_or_pk tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_compound_key tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_compound_key_relationship tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_compound_key_relationship_invalid_key tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_passing_session_to_load tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_validation_passing_session_to_validate tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_passing_session_to_constructor tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_validation_passing_session_to_constructor tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_loading_and_validation_with_no_session_raises_error tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_custom_related_column tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_model_schema_with_attribute tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_dump_many_to_one_relationship tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_load_many_to_one_relationship tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_fields_option tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_exclude_option tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_include_fk_option tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_additional_option tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_field_override tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_a_teacher_who_is_a_substitute tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_dump_only_relationship tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_transient_schema tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_transient_load tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_transient_load_with_unknown_include tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_transient_schema_with_relationship tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_transient_schema_with_association tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_transient_schema_with_implicit_association tests/test_marshmallow_sqlalchemy.py::TestModelSchema::test_exclude tests/test_marshmallow_sqlalchemy.py::TestNullForeignKey::test_a_teacher_with_no_school tests/test_marshmallow_sqlalchemy.py::TestNullForeignKey::test_a_teacher_who_is_not_a_substitute tests/test_marshmallow_sqlalchemy.py::TestDeserializeObjectThatDNE::test_deserialization_of_seminar_with_many_lectures_that_DNE tests/test_marshmallow_sqlalchemy.py::TestMarshmallowContext::test_getting_session_from_marshmallow_context tests/test_marshmallow_sqlalchemy.py::TestNestedFieldSession::test_session_is_passed_to_nested_field tests/test_marshmallow_sqlalchemy.py::TestNestedFieldSession::test_session_is_passed_to_nested_field_in_list_field tests/test_marshmallow_sqlalchemy.py::test_merge_validators[defaults0-new0-expected0] tests/test_marshmallow_sqlalchemy.py::test_merge_validators[defaults1-new1-expected1] tests/test_marshmallow_sqlalchemy.py::test_merge_validators[defaults2-new2-expected2] tests/test_marshmallow_sqlalchemy.py::test_merge_validators[defaults3-new3-expected3]
CHANGELOG.rst src/marshmallow_sqlalchemy/fields.py
CHANGELOG.rst src/marshmallow_sqlalchemy/fields.py