Ash FrameworkAF
Ash Framework3y ago
6 replies
Blibs

What is the __metadata__ field in new versions of Ash?

I just updated my Ash to the latest version 2.13.2.

After that, I noticed that a lot of my unit tests stopped working basically because I was comparing resources.

From what I can see, when I create the resource, the __metadata__ field will be a empty map %{}, but when I fetch the same resource with a read action, it will contain a key called selected in that map with the list of fields that were selected.

Was this a new addition?

Is there some way to disable that in tests so I can compare resources maps instead of having to process then before doing my asserts?
Was this page helpful?