Question
Can not insert null Guid in Creatio instance running in PostgreSQL
15:54 Jan 23, 2023
Hello Team,
I am trying to insert a null guid directly to the DB. I use the following snippet
QueryColumnExpression nullParameter = Column.Parameter(DBNull.Value, new GuidDataValueType(UserConnection.DataValueTypeManager)); update.Set("ResponseDetailsId", nullParameter);
I get the following exception
System.NotSupportedException: The CLR type Terrasoft.Core.DB.QueryColumnExpression isn't supported by Npgsql or your PostgreSQL. If you wish to map it to a PostgreSQL composite type you need to register it before usage, please refer to the documentation.
If this is not a suitable way, which is the proper way to insert a null guid directly in a PostgreSQL db from C# code ?
Like
1 comments
16:33 Jan 23, 2023
Solved
Example
new Update(_userConnection, "SysAdminUnit") .Set("LDAPElementId", Column.Parameter(null, "Guid")) .Where("SynchronizeWithLDAP").IsEqual(Column.Parameter(true)); int operationsCount = update.Execute();
Show all comments