Skip to content

Commit

Permalink
fix: create unique id for image associated with record
Browse files Browse the repository at this point in the history
Records and images actually have a many-to-many relationship, but here it's been defined as a one-to-many; using the url as an id for the image was causing subsequent references to the same image to overwrite the previous record associations, so some records did not have any images. This also caused long loading times because the image would be requested for every record but only shown for the last.
Using an id that is unique to the resource, record, and image means that images are repeated but that's probably clearer anyway.
  • Loading branch information
alycejenni committed Apr 12, 2024
1 parent 6b7e12d commit d215a94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Loading

0 comments on commit d215a94

Please sign in to comment.