Skip to content

Commit

Permalink
fix "Column 'createdon' does not allow DBNull.Value"
Browse files Browse the repository at this point in the history
  • Loading branch information
James May committed Jun 20, 2024
1 parent d4f1403 commit 926a40c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MarkMpn.Sql4Cds.Engine/ExecutionPlan/FetchXmlScan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1278,8 +1278,8 @@ private void AddNotNullFilters(ColumnList schema, Dictionary<string, IReadOnlyLi

private void AddSchemaAttribute(DataSource dataSource, ColumnList schema, Dictionary<string, IReadOnlyList<string>> aliases, string fullName, string simpleName, DataTypeReference type, EntityMetadata entityMetadata, AttributeMetadata attrMetadata, bool innerJoin)
{
var notNull = innerJoin && (attrMetadata.LogicalName == entityMetadata.PrimaryIdAttribute || attrMetadata.LogicalName == "createdon");

var notNull = innerJoin && (attrMetadata.LogicalName == entityMetadata.PrimaryIdAttribute);
// Add the logical attribute
AddSchemaAttribute(schema, aliases, fullName, simpleName, type, notNull);

Expand Down

0 comments on commit 926a40c

Please sign in to comment.