PostgresDataProvider: Disabling data column with DataColumnName not working #776
-
|
When using a PostgresDataProvider the documentation says the following: DataColumnName: The column name of the event table where the JSON will be stored. Can be set to NULL to avoid including the JSON column. If not specified, the default column name is dataWhen I try to do so when creating my provider I get an error: I have tried a few different methods of casting null to the Setting object but can't seem to figure out what I am missing. Snippet of my provider: var efPostgresSqlDataProvider = new PostgreSqlDataProvider()
{
ConnectionString = connectionString,
Schema = "audit",
TableName = "ef_logging",
IdColumnName = "id",
DataColumnName = null, // todo need to disable data column..... This does not work, see above for exact error
CustomColumns =
[
<Some custom fields that make me not care about the rest of the data>
]
};Any assistance on what I am missing and how to disable the data column would be appreciated. If impossible, can/how would a custom provider accomplish this. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Try using That said, I think the documentation is misleading, and it would probably make more sense for the default to be null rather than the opinionated default column name of "data". I am creating an issue based on this discussion so it can be clarified and standardized in the next version. |
Beta Was this translation helpful? Give feedback.
Try using
DataColumnName = new Setting<string>()instead ofDataColumnName = null.That said, I think the documentation is misleading, and it would probably make more sense for the default to be null rather than the opinionated default column name of "data".
I am creating an issue based on this discussion so it can be clarified and standardized in the next version.