PR should improve the overall Annotation logic.
Most of the refinements are related to constructing the correct target property paths.
This is a difficult process because of the different levels class and field annotations work on.
These changes make sure to interconnect the two, making annotations on an existing field, will now use the parent class of that field to determine the formatted path using a new utility function.
The most important part of this function is to add the index when necessary, like for example when you are annotating the country field of a location, the user must choose an existing location class, which is nested inside an occurrence class.
Choosing a specific instance will grab the parent classes, check the indexes, and make sure they are represented in the path, resulting with for example: occurrences[0].location.country.
The code that makes up the annotation process has become big and a bit messy, it might be good to clean this up some time in the future. At least the functionality should work.
PR should improve the overall Annotation logic. Most of the refinements are related to constructing the correct target property paths. This is a difficult process because of the different levels class and field annotations work on. These changes make sure to interconnect the two, making annotations on an existing field, will now use the parent class of that field to determine the formatted path using a new utility function. The most important part of this function is to add the index when necessary, like for example when you are annotating the country field of a location, the user must choose an existing location class, which is nested inside an occurrence class. Choosing a specific instance will grab the parent classes, check the indexes, and make sure they are represented in the path, resulting with for example: occurrences[0].location.country.
The code that makes up the annotation process has become big and a bit messy, it might be good to clean this up some time in the future. At least the functionality should work.