diff --git a/.travis.yml b/.travis.yml
index 1709012..23f1ae4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,8 @@ sudo: required
 python:
   - 3.5
   - 3.6
-  - 3.7-dev
+  - 3.7
+  - 3.8
 services:
   - docker
 before_install:
@@ -13,7 +14,6 @@ install:
   - pip install '.[test]'
   - pip install '.[docs]'
 script:
-  - docker ps | grep -q 'provdbconnector_neo4j_1'
   - curl --output /dev/null --silent --head --fail http://localhost:7474
   - coverage run --source=provdbconnector setup.py test
   - make docs-travis
diff --git a/examples/simple_example_influence.py b/examples/simple_example_influence.py
new file mode 100644
index 0000000..7813d67
--- /dev/null
+++ b/examples/simple_example_influence.py
@@ -0,0 +1,28 @@
+from prov.model import ProvDocument
+from provdbconnector import ProvDb
+from provdbconnector.db_adapters.in_memory import SimpleInMemoryAdapter
+
+prov_api = ProvDb(adapter=SimpleInMemoryAdapter, auth_info=None)
+
+# create the prov document
+prov_document = ProvDocument()
+prov_document.add_namespace("ex", "http://example.com")
+
+prov_document.agent("ex:Bob")
+prov_document.activity("ex:Alice")
+
+prov_document.influence("ex:Alice", "ex:Bob")
+
+document_id = prov_api.save_document(prov_document)
+
+print(prov_api.get_document_as_provn(document_id))
+
+# Output:
+#
+# document
+#   prefix ex < http: // example.com >
+#
+#   agent(ex: Bob)
+#   activity(ex: Alice, -, -)
+#   wasInfluencedBy(ex: Alice, ex: Bob)
+# endDocument
diff --git a/provdbconnector/prov_db.py b/provdbconnector/prov_db.py
index 4fb41b2..6568b4f 100644
--- a/provdbconnector/prov_db.py
+++ b/provdbconnector/prov_db.py
@@ -558,7 +558,8 @@ class ProvDb(object):
         to_type_cls = PROV_ATTR_BASE_CLS[to_type]
 
         if from_type_cls is None or to_type_cls is None:
-            log.info("Something went wrong ")
+            raise InvalidArgumentTypeException(
+                "Could not determinate typ for relation from: {}, to: {}, prov_relation was {}, ".format(from_type, to_type, type(prov_relation)))
         #save from and to node
         self.save_element(prov_element=from_type_cls(prov_relation.bundle, identifier=from_qualified_name), bundle_id=bundle_id)
 
diff --git a/provdbconnector/utils/serializer.py b/provdbconnector/utils/serializer.py
index 642e883..472efe8 100644
--- a/provdbconnector/utils/serializer.py
+++ b/provdbconnector/utils/serializer.py
@@ -13,7 +13,8 @@ from prov.constants import PROV_QUALIFIEDNAME, PROV_ATTRIBUTES_ID_MAP, PROV_ATTR
     PROV_ATTR_GENERATION,PROV_ATTR_USAGE,PROV_ATTR_SPECIFIC_ENTITY,PROV_ATTR_GENERAL_ENTITY,PROV_ATTR_ALTERNATE1, \
     PROV_ATTR_ALTERNATE2,PROV_ATTR_BUNDLE,PROV_ATTR_INFLUENCEE,PROV_ATTR_INFLUENCER
 
-from prov.model import Literal, Identifier, QualifiedName, Namespace, parse_xsd_datetime, PROV_REC_CLS, ProvAgent, ProvEntity, ProvActivity
+from prov.model import Literal, Identifier, QualifiedName, Namespace, parse_xsd_datetime, PROV_REC_CLS, ProvAgent, \
+    ProvEntity, ProvActivity, ProvElement
 from provdbconnector.db_adapters.baseadapter import METADATA_KEY_NAMESPACES, METADATA_KEY_PROV_TYPE, \
     METADATA_KEY_TYPE_MAP
 from provdbconnector.exceptions.database import MergeException
@@ -53,15 +54,15 @@ PROV_ATTR_BASE_CLS = {
     PROV_ATTR_RESPONSIBLE: ProvAgent,
     PROV_ATTR_GENERATED_ENTITY: ProvEntity,
     PROV_ATTR_USED_ENTITY: ProvEntity,
-    PROV_ATTR_GENERATION: None,
-    PROV_ATTR_USAGE:None,
+    PROV_ATTR_GENERATION: ProvElement,
+    PROV_ATTR_USAGE: ProvElement,
     PROV_ATTR_SPECIFIC_ENTITY: ProvEntity,
     PROV_ATTR_GENERAL_ENTITY: ProvEntity,
     PROV_ATTR_ALTERNATE1: ProvEntity,
     PROV_ATTR_ALTERNATE2: ProvEntity,
-    PROV_ATTR_BUNDLE:None,
-    PROV_ATTR_INFLUENCEE:None,
-    PROV_ATTR_INFLUENCER:None,
+    PROV_ATTR_BUNDLE:ProvElement,
+    PROV_ATTR_INFLUENCEE: ProvElement,
+    PROV_ATTR_INFLUENCER: ProvElement,
     PROV_ATTR_COLLECTION: ProvEntity
 }
 
@@ -370,9 +371,27 @@ def merge_record(attributes, metadata, other_attributes, other_metadata):
     attributes_merged = attributes.copy()
     attributes_merged.update(other_attributes)
 
-    if metadata[METADATA_KEY_PROV_TYPE] != other_metadata[METADATA_KEY_PROV_TYPE]:
+    metadata_prov_typ = metadata[METADATA_KEY_PROV_TYPE]
+    other_metadata_prov_typ = other_metadata[METADATA_KEY_PROV_TYPE]
+
+    # Determinate non unknown prov type for merge
+    merged_prov_typ = other_metadata_prov_typ
+    is_one_prov_type_unknown = False
+    # Support unknown typ during the merge process, needed for polymorph nodes
+    if other_metadata_prov_typ.localpart == "Unknown":
+        merged_prov_typ = metadata_prov_typ
+        is_one_prov_type_unknown = True
+
+    if metadata_prov_typ.localpart == "Unknown":
+        merged_prov_typ = other_metadata_prov_typ
+        is_one_prov_type_unknown = True
+
+    if merged_prov_typ.localpart == "Unknown":
+        raise MergeException("Prov type can't be unknown metadata: {}, other metadata: {}".format(metadata_prov_typ, other_metadata_prov_typ))
+
+    if metadata_prov_typ != other_metadata_prov_typ and not is_one_prov_type_unknown:
         raise MergeException(
-            "Prov type should be the same but is: {}:{}".format(METADATA_KEY_PROV_TYPE, METADATA_KEY_PROV_TYPE))
+            "Prov type should be the same but is: {}:{}".format(metadata_prov_typ, other_metadata_prov_typ))
 
     for (key, value) in attributes.items():
         if attributes_merged[key] != value:
@@ -388,6 +407,7 @@ def merge_record(attributes, metadata, other_attributes, other_metadata):
 
     merged_metadata = metadata.copy()
     merged_metadata.update(other_metadata)
+    merged_metadata.update({METADATA_KEY_PROV_TYPE: merged_prov_typ})
     merged_metadata.update({METADATA_KEY_NAMESPACES: merged_metadata_namespaces})
     merged_metadata.update({METADATA_KEY_TYPE_MAP: merged_metadata_type_map})
 
diff --git a/setup.py b/setup.py
index 311e68d..fba276c 100644
--- a/setup.py
+++ b/setup.py
@@ -35,6 +35,9 @@ setup(
         'License :: OSI Approved :: Apache Software License',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5'
+        'Programming Language :: Python :: 3.6'
+        'Programming Language :: Python :: 3.7'
+        'Programming Language :: Python :: 3.8'
     ],
     license="Apache License 2.0",
 

influence(influencee, influencer, identifier=None, other_attributes=None) causes "TypeError: 'NoneType' object is not callable"
Hello,
i tried to call the prov influence in combination of agent, entity and activity with all possible combination. The result was a TypeError: 'NoneType' object is not callable.

Traceback (most recent call last):
  File "c:\Users\..\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py", line 43, in <module>
    main(ptvsdArgs)
  File "c:\Users\..\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 432, in main
    run()
  File "c:\Users\..\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 316, in run_file
    runpy.run_path(target, run_name='__main__')
  File "C:\Anaconda3\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Anaconda3\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\dev\..\ProvDBConnector\prov_model_test1.py", line 199, in <module>
    document_id = prov_api.save_document(prov_document)
  File "C:\Anaconda3\lib\site-packages\provdbconnector\prov_db.py", line 162, in save_document
    doc_id = self._save_bundle_internal(prov_document)
  File "C:\Anaconda3\lib\site-packages\provdbconnector\prov_db.py", line 503, in _save_bundle_internal
    self.save_relation(relation, bundle_id)
  File "C:\Anaconda3\lib\site-packages\provdbconnector\prov_db.py", line 563, in save_relation
    self.save_element(prov_element=from_type_cls(prov_relation.bundle, identifier=from_qualified_name), bundle_id=bundle_id)
TypeError: 'NoneType' object is not callable

Python: 3.7.1
prov-db-connector: 0.3.1
prov: 1.5.2 / 1.5.3

diff --git a/examples/tests/test_examples.py b/examples/tests/test_examples.py
index f570c9d..396b4d0 100644
--- a/examples/tests/test_examples.py
+++ b/examples/tests/test_examples.py
@@ -35,6 +35,13 @@ class ExamplesTest(unittest.TestCase):
         """
         import examples.simple_example
 
+    def test_simple_example_influence(self):
+        """
+        Test the basic example with influence by relation
+
+        """
+        import examples.simple_example_influence
+
     def test_simple_example_with_neo4j(self):
         """
         Test the basic neo4j example
diff --git a/provdbconnector/tests/examples.py b/provdbconnector/tests/examples.py
index b17330a..5f30f87 100644
--- a/provdbconnector/tests/examples.py
+++ b/provdbconnector/tests/examples.py
@@ -17,6 +17,16 @@ from provdbconnector.db_adapters.baseadapter import METADATA_KEY_NAMESPACES, MET
     METADATA_KEY_TYPE_MAP, METADATA_KEY_IDENTIFIER
 
 
+def prov_db_unknown_prov_typ_example():
+    doc = ProvDocument()
+    doc.add_namespace("ex", "https://example.com")
+    doc.entity(identifier="ex:Entity1")
+    doc.entity(identifier="ex:Entity2")
+    doc.influence(influencee="ex:Entity1", influencer="ex:Entity2")
+    return doc
+
+
+
 def attributes_dict_example():
     """
     Retuns a example dict with some different attributes
diff --git a/provdbconnector/tests/test_prov_db.py b/provdbconnector/tests/test_prov_db.py
index 0919e12..f53bf9e 100644
--- a/provdbconnector/tests/test_prov_db.py
+++ b/provdbconnector/tests/test_prov_db.py
@@ -641,6 +641,18 @@ class ProvDbTests(unittest.TestCase):
         with self.assertRaises(InvalidArgumentTypeException):
             self.provapi._get_metadata_and_attributes_for_record(None)
 
+    def test_save_unknown_prov_typ(self):
+        """
+        Test to prefer non unknown prov type
+        """
+        self.clear_database()
+        doc = examples.prov_db_unknown_prov_typ_example()
+        self.provapi.save_document(doc)
+        doc_with_entities = self.provapi.get_elements(ProvEntity)
+        self.assertEqual(len(doc_with_entities.records), 2)
+        self.assertIsInstance(doc_with_entities.records[0], ProvEntity)
+        self.assertIsInstance(doc_with_entities.records[1], ProvEntity)
+
     def test_get_metadata_and_attributes_for_record(self):
         """
         Test the split into metadata / attributes function

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
babel==2.17.0
certifi==2025.1.31
charset-normalizer==3.4.1
commonmark==0.9.1
coverage==7.8.0
coveralls==4.0.1
docopt==0.6.2
docutils==0.21.2
exceptiongroup==1.2.2
execnet==2.1.1
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
isodate==0.7.2
Jinja2==3.1.6
lxml==5.3.1
MarkupSafe==3.0.2
mock==5.2.0
neo4j-driver==1.7.5
neobolt==1.7.17
neotime==1.7.4
networkx==3.2.1
packaging==24.2
pluggy==1.5.0
pockets==0.9.1
prov==1.5.3
-e git+https://github.com/DLR-SC/prov-db-connector.git@432547dbcfe4d2424b8f7f565f3ef3117f9449f0#egg=prov_db_connector
Pygments==2.19.1
pyparsing==3.2.3
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
pytz==2025.2
rdflib==7.1.4
recommonmark==0.7.1
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-httpdomain==1.8.1
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-napoleon==0.7
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
typing_extensions==4.13.0
urllib3==2.3.0
zipp==3.21.0

name: prov-db-connector
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
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - babel==2.17.0
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - commonmark==0.9.1
      - coverage==7.8.0
      - coveralls==4.0.1
      - docopt==0.6.2
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - isodate==0.7.2
      - jinja2==3.1.6
      - lxml==5.3.1
      - markupsafe==3.0.2
      - mock==5.2.0
      - neo4j-driver==1.7.5
      - neobolt==1.7.17
      - neotime==1.7.4
      - networkx==3.2.1
      - packaging==24.2
      - pluggy==1.5.0
      - pockets==0.9.1
      - prov==1.5.3
      - pygments==2.19.1
      - pyparsing==3.2.3
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - rdflib==7.1.4
      - recommonmark==0.7.1
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-httpdomain==1.8.1
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-napoleon==0.7
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - zipp==3.21.0
prefix: /opt/conda/envs/prov-db-connector

examples/tests/test_examples.py::ExamplesTest::test_simple_example_influence
examples/tests/test_examples.py::ExamplesTest::test_horsemeat_example examples/tests/test_examples.py::ExamplesTest::test_simple_example_with_neo4j examples/tests/test_examples.py::ExamplesTest::test_test_complex_example_with_neo4j provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_bundles1 provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_bundles2 provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_collections provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_datatypes provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_long_literals provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_primer_example_alternate provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_prov_primer_example provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_w3c_publication_1 provdbconnector/tests/test_prov_db.py::ProvDbTestTemplate::test_w3c_publication_2 provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_bundle provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_bundle_invalid provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_document_as_json provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_document_as_prov provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_document_as_prov_invalid_arguments provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_document_as_provn provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_document_as_xml provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_element provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_element_invalid provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_elements provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_metadata_and_attributes_for_record provdbconnector/tests/test_prov_db.py::ProvDbTests::test_get_metadata_and_attributes_for_record_invalid_arguments provdbconnector/tests/test_prov_db.py::ProvDbTests::test_provapi_instance provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_bundle provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_bundle_invalid provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_bundle_invalid_arguments provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_json provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_prov provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_prov_alternate provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_prov_bundles provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_prov_bundles2 provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_prov_invalid_arguments provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_provn provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_document_from_xml provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_element provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_element_invalid provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_record provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_record_invalid provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_relation_invalid provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_relation_with_unknown_nodes provdbconnector/tests/test_prov_db.py::ProvDbTests::test_save_unknown_prov_typ
examples/tests/test_examples.py::ExamplesTest::test_bundle_example examples/tests/test_examples.py::ExamplesTest::test_file_buffer_example examples/tests/test_examples.py::ExamplesTest::test_merge_example examples/tests/test_examples.py::ExamplesTest::test_merge_fail_example examples/tests/test_examples.py::ExamplesTest::test_simple_example
provdbconnector/prov_db.py setup.py provdbconnector/utils/serializer.py .travis.yml examples/simple_example_influence.py
provdbconnector/prov_db.py setup.py provdbconnector/utils/serializer.py .travis.yml examples/simple_example_influence.py