Closed marcuslindblom closed 3 months ago
Can you show the full error and maybe repro code?
@marcuslindblom We use metadata internal class instead of object to track changes etc.
What about writing interceptor which removes metadata property before going to frontend?
On the other hand passing entire db objects to front might be security issue (but in depends on what you store inside your DB objects).
@ml054 That is a valid point. Is interceptor a concept or do you mean a projection or something like that?
By interceptor I meant your custom code which prepares raw entity returned from DB into to user.
@marcuslindblom can you confirm that suggested solución solves your problem?
Yes, it works fine.
When I load a document I get an object looking similar to this:
This seem to cause problems when using for instance Next.js, getting the data in getServerSideProps and when the data is transferred to the frontend components it throws an error saying something like, it only supports plain object. Maybe you should consider to remove MetadataInternal from the result and return a plain JSON object instead?