Search code examples
c#breezeentity-framework-6single-page-applicationhottowel

Error when fetching metadata after upgrading Breeze from 1.4.11 to 1.4.16


I upgraded Breeze from 1.4.11 to 1.4.16 using Nuget, and now I get this error when getting the metadata using manager.fetchMetadata():

Metadata query failed for: http://localhost:50015/breeze/Application/Metadata. Unable to either parse or import metadata: NamingConvention for this client property name does not roundtrip properly:DefaultIngredientCode-->defaultIngredientCode; [object Object]

That DefaultIngredientCode property is declared in the partial class of an Entity Framework table. It's NOT a column in a table. It's declared like this:

public string DefaultIngredientCode { get; set; }

Everything was working fine, until I upgraded Breeze Client and Server to version 1.4.16.

Are there changes that I have to do after the upgrade?

I'm using Hot Towel and Entity Framework 6.0.0.


Solution

  • There was a bug fix introduced into Breeze 1.4.14 ( this fragment below is from the release notes).

    • D2610 - Handle casing correctly for unmapped properties. Previously unmapped properties would not go thru the registered namingConvention when registered late. Note: this could be a breaking change if you were counting on the previous 'errant' behavior

    My guess is that you have a 'DefaultIngredientCode' property declared in the javascript constructor of your entity class. Since this name is NOT camelCased it does not roundtrip properly. If you change this property to 'defaultIngredientCode' your code should work properly. NOTE: this is a client side change NOT a server side change.