Skip to content

Conversation

@rusamant
Copy link
Contributor

@rusamant rusamant commented Apr 5, 2024

What is this change?

Change TypeName in DatabaseObjectConverter during DatabaseObject Serialization to exclude the unwanted parts.

Currently TypeName field added during DatabaseObject serialization is set to Type.AssemblyQualifiedName, which looks like : "Azure.DataApiBuilder.Config.DatabasePrimitives.DatabaseTable, Azure.DataApiBuilder.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"

1.0.0.0 was the default value set, hence when the version changes, deserialization will fail if the initial serialization had version as 1.0.0.0.

Updating this TypeName to only include the necessary parts : "Azure.DataApiBuilder.Config.DatabasePrimitives.DatabaseTable, Azure.DataApiBuilder.Config"

Tested again by using Type.FullName which is "Azure.DataApiBuilder.Config.DatabasePrimitives.DatabaseTable", but serialization fails saying DatabaseTable not found.

Why make this change?

Due to recent changes to update the version number based of release, deserialization on graphql workload failed, it is looking for version 1.0.0.0 which doesnot exists. Hence removing the dependency on version number.

How was this tested?

  • Unit Tests

@rusamant
Copy link
Contributor Author

rusamant commented Apr 5, 2024

/azp run

1 similar comment
@rusamant
Copy link
Contributor Author

rusamant commented Apr 5, 2024

/azp run

@rusamant rusamant merged commit 9504f1d into main Apr 8, 2024
@rusamant rusamant deleted the rusamant/fix_typename_databaseobjectserialization branch April 8, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants