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

Design error annotations on Base #2908

Open
mmsmits opened this issue Oct 9, 2024 · 2 comments
Open

Design error annotations on Base #2908

mmsmits opened this issue Oct 9, 2024 · 2 comments

Comments

@mmsmits
Copy link
Member

mmsmits commented Oct 9, 2024

No description provided.

@ewoutkramer
Copy link
Member

When we have decided, make sure we update PocoBuilderNew.cs to not throw an InvalidCastException, but handle this gracefully instead.

@ewoutkramer
Copy link
Member

The whole intent here is to be able to let the POCO model reflect data that does not fit the POCO model. In ATL we figured that each POCO can have an error annotation to indicate that we did not REALLY find that POCO there, but something else instead (e.g. we found a list where we expected a single instance, we found a string where we expected an object etc).

After thinking about this a bit more, maybe we just need a "look at the overflow" bit in a resource, which basically enables us to "divert" from the original property to the overflow, where we can then represent everything. The reason we did not design this intitially, is that we don't want evert property to be potentially present in the overflow (it means checking to places for every access), but if we'd use just this "bit", we only need to check the bit (instead of a dict lookup) to know that we then need to do a dict lookup. But that's in error cases, and exceptional anyway.

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

No branches or pull requests

2 participants