You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py", line 158, in __get__
rel_obj = self.field.get_cached_value(instance)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/fields/mixins.py", line 13, in get_cached_value
return instance._state.fields_cache[cache_name]
KeyError: 'voie'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 3, in <module>
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py", line 164, in __get__
rel_obj = self.get_object(instance)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py", line 139, in get_object
return qs.get(self.field.get_reverse_related_filter(instance))
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/query.py", line 397, in get
num = len(clone)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/query.py", line 254, in __len__
self._fetch_all()
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/query.py", line 1182, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/query.py", line 53, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1068, in execute_sql
cursor.execute(sql, params)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 100, in execute
return super().execute(sql, params)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/django/db/backends/firebird/base.py", line 262, in execute
return self.cursor.execute(q, params)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/fdb/fbcore.py", line 3677, in execute
self._ps._execute(parameters)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/fdb/fbcore.py", line 3349, in _execute
self.__tuple2xsqlda(self._in_sqlda, parameters)
File "/home/manu/env01/fbtest/venv/lib/python3.6/site-packages/fdb/fbcore.py", line 3132, in __tuple2xsqlda
len(value)))
ValueError: Value of parameter (0) is too long, expected 16, found 32
The first problem is that I get an incorrect validation, the max_length should be 32 so I should not get this error. How I can avoid this?
The second problem is that if I comment this part of the code in the driver, I get an SQL error because the where clause is incorrect.
Instead of having WHERE voie_id = 'abcd123', I should get WHERE voie_id = x'abcd123'
like hexadecimal notation: https://firebirdsql.org/refdocs/langrefupd25-hexbinstrings.html
So how i can custom the where clause in the generated parameter or is there another way to get it working?
The text was updated successfully, but these errors were encountered:
e-belair
changed the title
domain field not properly recognized
uuid field not properly recognized
Nov 13, 2018
Hi, I have the following database schema:
The D_UUID field is a domain type field like
Char(16) CHARACTER SET OCTETS
NOT NULL
COLLATE OCTETS
My Python models is like this:
In console, if I try to get the related AgdeVoie from Etab I get an error:
The first problem is that I get an incorrect validation, the max_length should be 32 so I should not get this error. How I can avoid this?
The second problem is that if I comment this part of the code in the driver, I get an SQL error because the where clause is incorrect.
Instead of having WHERE voie_id = 'abcd123', I should get WHERE voie_id = x'abcd123'
like hexadecimal notation: https://firebirdsql.org/refdocs/langrefupd25-hexbinstrings.html
So how i can custom the where clause in the generated parameter or is there another way to get it working?
The text was updated successfully, but these errors were encountered: