There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Run-time Error with Non-public Records
I've come across an issue wherein run-time reflection (for example in functions like Db.query) over non-public records raises exceptions. I did a little digging, and I think the issue is as follows: at some point, 'FSharpType.IsRecord' (maybe in Meta.fs
?) is being called. If you invoke this function passing only a single parameter (the type in question) it assumes BindingFlags.Public. Unfortunately, this means the records types which have a more restrictive access modifier return false. If I'm understanding
the rest of the code correctly, the fix could be as easy as adding a second input to the calls to 'FSharpType.IsRecord' (i.e. 'BindingFlags.Public|||BindingFlags.NonPublic'). Of course, I'm not very intimate with the larger Soma codebase, so I may have over-simplified