Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change TypeName in DatabaseObject Serialization to exclude unwanted parts #2154

Merged
merged 3 commits into from
Apr 8, 2024

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
7 checks passed
@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.

None yet

4 participants