echo-swent / echo

4 stars 0 forks source link

add url and relatedTag to Associations and make Event and UserProfile only include a header of Association(s) #355

Closed violoncelloCH closed 3 months ago

violoncelloCH commented 3 months ago

closes #264

This extends the Association dataclass to hold two additional attributes: url and relatedTags. While the url is a simple string field in the db, the relatedTags are stored as a relation between the Association and the Tag. Since Associations were embedded inside Events as well as UserProfile data classes, this would have meant fetching all the Tags related to the Associations whenever we want a UserProfile (or an Event). To be precise, we talk about multiple four-way nested joins across a total of 8 tables to fetch a UserProfile. In order to simplify this, together with @octogradiste we decided to not embed Associations in Events and UserProfiles anymore. Instead we just embed a simplified object, called AssociationHeader, only containing the id and the name of the Association, analogous to how we already do it for the EventCreator on Events.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
76.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud