Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Improve error logging with database decorators #103

Open
EVCareeria opened this issue Aug 23, 2023 · 1 comment
Open

Improve error logging with database decorators #103

EVCareeria opened this issue Aug 23, 2023 · 1 comment

Comments

@EVCareeria
Copy link
Contributor

We need more precise error logging for database entity decorators.

Such as incorrect entity typing should be more informative.
Right now we may get error like:
ERROR: TypeError: Could not create entity correctly: [object Object]

@thejhh
Copy link
Contributor

thejhh commented Aug 23, 2023

In reality this error happens in EntityUtils.toEntity() because the entity object created was no extended from Entity base class. E.g. the isEntity() check fails.

This utility uses the createEntity() function from the entity metadata to prepare the Entity object. This function is initialized by the use of @Table annotation.

So in order for this error to happen, you would have to have your Entity class not extended from the same Entity class our data framework is using.

thejhh pushed a commit that referenced this issue Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants